| 500 |
pvar->ssh_state.payloadlen = cur_decompressed_bytes; |
pvar->ssh_state.payloadlen = cur_decompressed_bytes; |
| 501 |
return cur_decompressed_bytes; |
return cur_decompressed_bytes; |
| 502 |
default: |
default: |
| 503 |
#ifdef I18N |
#ifndef NO_I18N |
| 504 |
strcpy(pvar->ts->UIMsg, "Invalid compressed data in received packet"); |
strcpy(pvar->ts->UIMsg, "Invalid compressed data in received packet"); |
| 505 |
UTIL_get_lang_msg("MSG_SSH_INVALID_COMPDATA_ERROR", pvar); |
UTIL_get_lang_msg("MSG_SSH_INVALID_COMPDATA_ERROR", pvar); |
| 506 |
notify_fatal_error(pvar, pvar->ts->UIMsg); |
notify_fatal_error(pvar, pvar->ts->UIMsg); |
| 535 |
pvar->ssh_state.payload_grabbed += num_bytes; |
pvar->ssh_state.payload_grabbed += num_bytes; |
| 536 |
if (pvar->ssh_state.payload_grabbed > in_buffer) { |
if (pvar->ssh_state.payload_grabbed > in_buffer) { |
| 537 |
char buf[128]; |
char buf[128]; |
| 538 |
#ifdef I18N |
#ifndef NO_I18N |
| 539 |
strcpy(pvar->ts->UIMsg, "Received truncated packet (%ld > %d) @ grab_payload()"); |
strcpy(pvar->ts->UIMsg, "Received truncated packet (%ld > %d) @ grab_payload()"); |
| 540 |
UTIL_get_lang_msg("MSG_SSH_TRUNCATED_PKT_ERROR", pvar); |
UTIL_get_lang_msg("MSG_SSH_TRUNCATED_PKT_ERROR", pvar); |
| 541 |
_snprintf(buf, sizeof(buf), pvar->ts->UIMsg, |
_snprintf(buf, sizeof(buf), pvar->ts->UIMsg, |
| 564 |
} else { |
} else { |
| 565 |
if (pvar->ssh_state.payload_grabbed > in_buffer) { |
if (pvar->ssh_state.payload_grabbed > in_buffer) { |
| 566 |
char buf[128]; |
char buf[128]; |
| 567 |
#ifdef I18N |
#ifndef NO_I18N |
| 568 |
strcpy(pvar->ts->UIMsg, "Received truncated packet (%ld > %d) @ grab_payload_limited()"); |
strcpy(pvar->ts->UIMsg, "Received truncated packet (%ld > %d) @ grab_payload_limited()"); |
| 569 |
UTIL_get_lang_msg("MSG_SSH_TRUNCATED_PKT_LIM_ERROR", pvar); |
UTIL_get_lang_msg("MSG_SSH_TRUNCATED_PKT_LIM_ERROR", pvar); |
| 570 |
_snprintf(buf, sizeof(buf), pvar->ts->UIMsg, |
_snprintf(buf, sizeof(buf), pvar->ts->UIMsg, |
| 603 |
|
|
| 604 |
if (SSHv1(pvar)) { |
if (SSHv1(pvar)) { |
| 605 |
if (CRYPT_detect_attack(pvar, pvar->ssh_state.payload, len)) { |
if (CRYPT_detect_attack(pvar, pvar->ssh_state.payload, len)) { |
| 606 |
#ifdef I18N |
#ifndef NO_I18N |
| 607 |
strcpy(pvar->ts->UIMsg, "'CORE insertion attack' detected. Aborting connection."); |
strcpy(pvar->ts->UIMsg, "'CORE insertion attack' detected. Aborting connection."); |
| 608 |
UTIL_get_lang_msg("MSG_SSH_COREINS_ERROR", pvar); |
UTIL_get_lang_msg("MSG_SSH_COREINS_ERROR", pvar); |
| 609 |
notify_fatal_error(pvar, pvar->ts->UIMsg); |
notify_fatal_error(pvar, pvar->ts->UIMsg); |
| 618 |
/* PKT guarantees that the data is always 4-byte aligned */ |
/* PKT guarantees that the data is always 4-byte aligned */ |
| 619 |
if (do_crc(pvar->ssh_state.payload, len - 4) != |
if (do_crc(pvar->ssh_state.payload, len - 4) != |
| 620 |
get_uint32_MSBfirst(pvar->ssh_state.payload + len - 4)) { |
get_uint32_MSBfirst(pvar->ssh_state.payload + len - 4)) { |
| 621 |
#ifdef I18N |
#ifndef NO_I18N |
| 622 |
strcpy(pvar->ts->UIMsg, "Detected corrupted data; connection terminating."); |
strcpy(pvar->ts->UIMsg, "Detected corrupted data; connection terminating."); |
| 623 |
UTIL_get_lang_msg("MSG_SSH_CORRUPTDATA_ERROR", pvar); |
UTIL_get_lang_msg("MSG_SSH_CORRUPTDATA_ERROR", pvar); |
| 624 |
notify_fatal_error(pvar, pvar->ts->UIMsg); |
notify_fatal_error(pvar, pvar->ts->UIMsg); |
| 645 |
if (!CRYPT_verify_receiver_MAC |
if (!CRYPT_verify_receiver_MAC |
| 646 |
(pvar, pvar->ssh_state.receiver_sequence_number, data, len + 4, |
(pvar, pvar->ssh_state.receiver_sequence_number, data, len + 4, |
| 647 |
data + len + 4)) { |
data + len + 4)) { |
| 648 |
#ifdef I18N |
#ifndef NO_I18N |
| 649 |
strcpy(pvar->ts->UIMsg, "Detected corrupted data; connection terminating."); |
strcpy(pvar->ts->UIMsg, "Detected corrupted data; connection terminating."); |
| 650 |
UTIL_get_lang_msg("MSG_SSH_CORRUPTDATA_ERROR", pvar); |
UTIL_get_lang_msg("MSG_SSH_CORRUPTDATA_ERROR", pvar); |
| 651 |
notify_fatal_error(pvar, pvar->ts->UIMsg); |
notify_fatal_error(pvar, pvar->ts->UIMsg); |
| 665 |
if (SSHv1(pvar)) { |
if (SSHv1(pvar)) { |
| 666 |
if (pvar->ssh_state.decompressing) { |
if (pvar->ssh_state.decompressing) { |
| 667 |
if (pvar->ssh_state.decompress_stream.avail_in != 0) { |
if (pvar->ssh_state.decompress_stream.avail_in != 0) { |
| 668 |
#ifdef I18N |
#ifndef NO_I18N |
| 669 |
strcpy(pvar->ts->UIMsg, "Internal error: a packet was not fully decompressed.\n" |
strcpy(pvar->ts->UIMsg, "Internal error: a packet was not fully decompressed.\n" |
| 670 |
"This is a bug, please report it."); |
"This is a bug, please report it."); |
| 671 |
UTIL_get_lang_msg("MSG_SSH_DECOMPRESS_ERROR", pvar); |
UTIL_get_lang_msg("MSG_SSH_DECOMPRESS_ERROR", pvar); |
| 812 |
pvar->notification_msg, |
pvar->notification_msg, |
| 813 |
pvar->notification_events) == |
pvar->notification_events) == |
| 814 |
SOCKET_ERROR) { |
SOCKET_ERROR) { |
| 815 |
#ifdef I18N |
#ifndef NO_I18N |
| 816 |
strcpy(pvar->ts->UIMsg, "A communications error occurred while sending an SSH packet.\n" |
strcpy(pvar->ts->UIMsg, "A communications error occurred while sending an SSH packet.\n" |
| 817 |
"The connection will close."); |
"The connection will close."); |
| 818 |
UTIL_get_lang_msg("MSG_SSH_SEND_PKT_ERROR", pvar); |
UTIL_get_lang_msg("MSG_SSH_SEND_PKT_ERROR", pvar); |
| 853 |
|
|
| 854 |
if (deflate(&pvar->ssh_state.compress_stream, Z_SYNC_FLUSH) != |
if (deflate(&pvar->ssh_state.compress_stream, Z_SYNC_FLUSH) != |
| 855 |
Z_OK) { |
Z_OK) { |
| 856 |
#ifdef I18N |
#ifndef NO_I18N |
| 857 |
strcpy(pvar->ts->UIMsg, "An error occurred while compressing packet data.\n" |
strcpy(pvar->ts->UIMsg, "An error occurred while compressing packet data.\n" |
| 858 |
"The connection will close."); |
"The connection will close."); |
| 859 |
UTIL_get_lang_msg("MSG_SSH_COMP_ERROR", pvar); |
UTIL_get_lang_msg("MSG_SSH_COMP_ERROR", pvar); |
| 924 |
// 圧縮対象はヘッダを除くペイロードのみ。 |
// 圧縮対象はヘッダを除くペイロードのみ。 |
| 925 |
buffer_append(msg, "\0\0\0\0\0", 5); // 5 = packet-length(4) + padding(1) |
buffer_append(msg, "\0\0\0\0\0", 5); // 5 = packet-length(4) + padding(1) |
| 926 |
if (buffer_compress(&pvar->ssh_state.compress_stream, pvar->ssh_state.outbuf + 12, len, msg) == -1) { |
if (buffer_compress(&pvar->ssh_state.compress_stream, pvar->ssh_state.outbuf + 12, len, msg) == -1) { |
| 927 |
#ifdef I18N |
#ifndef NO_I18N |
| 928 |
strcpy(pvar->ts->UIMsg, "An error occurred while compressing packet data.\n" |
strcpy(pvar->ts->UIMsg, "An error occurred while compressing packet data.\n" |
| 929 |
"The connection will close."); |
"The connection will close."); |
| 930 |
UTIL_get_lang_msg("MSG_SSH_COMP_ERROR", pvar); |
UTIL_get_lang_msg("MSG_SSH_COMP_ERROR", pvar); |
| 1237 |
int description_len; |
int description_len; |
| 1238 |
char buf[2048]; |
char buf[2048]; |
| 1239 |
char FAR *explanation = ""; |
char FAR *explanation = ""; |
| 1240 |
#ifdef I18N |
#ifndef NO_I18N |
| 1241 |
char uimsg[MAX_UIMSG]; |
char uimsg[MAX_UIMSG]; |
| 1242 |
#endif |
#endif |
| 1243 |
|
|
| 1273 |
} |
} |
| 1274 |
|
|
| 1275 |
if (get_handler(pvar, SSH_SMSG_FAILURE) == handle_forwarding_failure) { |
if (get_handler(pvar, SSH_SMSG_FAILURE) == handle_forwarding_failure) { |
| 1276 |
#ifdef I18N |
#ifndef NO_I18N |
| 1277 |
strcpy(pvar->ts->UIMsg, "\nIt may have disconnected because it was unable to forward a port you requested to be forwarded from the server.\n" |
strcpy(pvar->ts->UIMsg, "\nIt may have disconnected because it was unable to forward a port you requested to be forwarded from the server.\n" |
| 1278 |
"This often happens when someone is already forwarding that port from the server."); |
"This often happens when someone is already forwarding that port from the server."); |
| 1279 |
UTIL_get_lang_msg("MSG_SSH_UNABLE_FWD_ERROR", pvar); |
UTIL_get_lang_msg("MSG_SSH_UNABLE_FWD_ERROR", pvar); |
| 1287 |
} |
} |
| 1288 |
|
|
| 1289 |
if (description != NULL) { |
if (description != NULL) { |
| 1290 |
#ifdef I18N |
#ifndef NO_I18N |
| 1291 |
strcpy(pvar->ts->UIMsg, "Server disconnected with message '%s'.%s"); |
strcpy(pvar->ts->UIMsg, "Server disconnected with message '%s'.%s"); |
| 1292 |
UTIL_get_lang_msg("MSG_SSH_SERVER_DISCON_ERROR", pvar); |
UTIL_get_lang_msg("MSG_SSH_SERVER_DISCON_ERROR", pvar); |
| 1293 |
_snprintf(buf, sizeof(buf), |
_snprintf(buf, sizeof(buf), |
| 1299 |
explanation); |
explanation); |
| 1300 |
#endif |
#endif |
| 1301 |
} else { |
} else { |
| 1302 |
#ifdef I18N |
#ifndef NO_I18N |
| 1303 |
strcpy(pvar->ts->UIMsg, "Server disconnected (no reason given).%s"); |
strcpy(pvar->ts->UIMsg, "Server disconnected (no reason given).%s"); |
| 1304 |
UTIL_get_lang_msg("MSG_SSH_SERVER_DISCON_NORES_ERROR", pvar); |
UTIL_get_lang_msg("MSG_SSH_SERVER_DISCON_NORES_ERROR", pvar); |
| 1305 |
_snprintf(buf, sizeof(buf), |
_snprintf(buf, sizeof(buf), |
| 1588 |
pvar->ssh_state.server_ID = _strdup(ID); |
pvar->ssh_state.server_ID = _strdup(ID); |
| 1589 |
|
|
| 1590 |
if (!parse_protocol_ID(pvar, ID) || !negotiate_protocol(pvar)) { |
if (!parse_protocol_ID(pvar, ID) || !negotiate_protocol(pvar)) { |
| 1591 |
#ifdef I18N |
#ifndef NO_I18N |
| 1592 |
strcpy(pvar->ts->UIMsg, "This program does not understand the server's version of the protocol."); |
strcpy(pvar->ts->UIMsg, "This program does not understand the server's version of the protocol."); |
| 1593 |
UTIL_get_lang_msg("MSG_SSH_VERSION_ERROR", pvar); |
UTIL_get_lang_msg("MSG_SSH_VERSION_ERROR", pvar); |
| 1594 |
notify_fatal_error(pvar, pvar->ts->UIMsg); |
notify_fatal_error(pvar, pvar->ts->UIMsg); |
| 1618 |
|
|
| 1619 |
if ((pvar->Psend) (pvar->socket, TTSSH_ID, TTSSH_ID_len, |
if ((pvar->Psend) (pvar->socket, TTSSH_ID, TTSSH_ID_len, |
| 1620 |
0) != TTSSH_ID_len) { |
0) != TTSSH_ID_len) { |
| 1621 |
#ifdef I18N |
#ifndef NO_I18N |
| 1622 |
strcpy(pvar->ts->UIMsg, "An error occurred while sending the SSH ID string.\n" |
strcpy(pvar->ts->UIMsg, "An error occurred while sending the SSH ID string.\n" |
| 1623 |
"The connection will close."); |
"The connection will close."); |
| 1624 |
UTIL_get_lang_msg("MSG_SSH_SEND_ID_ERROR", pvar); |
UTIL_get_lang_msg("MSG_SSH_SEND_ID_ERROR", pvar); |
| 1853 |
if (!SSH2_dispatch_enabled_check(message) || handler == NULL) { |
if (!SSH2_dispatch_enabled_check(message) || handler == NULL) { |
| 1854 |
char buf[1024]; |
char buf[1024]; |
| 1855 |
|
|
| 1856 |
#ifdef I18N |
#ifndef NO_I18N |
| 1857 |
strcpy(pvar->ts->UIMsg, "Unexpected SSH2 message(%d) on current stage(%d)"); |
strcpy(pvar->ts->UIMsg, "Unexpected SSH2 message(%d) on current stage(%d)"); |
| 1858 |
UTIL_get_lang_msg("MSG_SSH_UNEXP_MSG2_ERROR", pvar); |
UTIL_get_lang_msg("MSG_SSH_UNEXP_MSG2_ERROR", pvar); |
| 1859 |
_snprintf(buf, sizeof(buf), |
_snprintf(buf, sizeof(buf), |
| 1871 |
if (SSHv1(pvar)) { |
if (SSHv1(pvar)) { |
| 1872 |
char buf[1024]; |
char buf[1024]; |
| 1873 |
|
|
| 1874 |
#ifdef I18N |
#ifndef NO_I18N |
| 1875 |
strcpy(pvar->ts->UIMsg, "Unexpected packet type received: %d"); |
strcpy(pvar->ts->UIMsg, "Unexpected packet type received: %d"); |
| 1876 |
UTIL_get_lang_msg("MSG_SSH_UNEXP_MSG_ERROR", pvar); |
UTIL_get_lang_msg("MSG_SSH_UNEXP_MSG_ERROR", pvar); |
| 1877 |
_snprintf(buf, sizeof(buf), |
_snprintf(buf, sizeof(buf), |
| 1917 |
|
|
| 1918 |
static BOOL handle_pty_failure(PTInstVar pvar) |
static BOOL handle_pty_failure(PTInstVar pvar) |
| 1919 |
{ |
{ |
| 1920 |
#ifdef I18N |
#ifndef NO_I18N |
| 1921 |
strcpy(pvar->ts->UIMsg, "The server cannot allocate a pseudo-terminal. " |
strcpy(pvar->ts->UIMsg, "The server cannot allocate a pseudo-terminal. " |
| 1922 |
"You may encounter some problems with the terminal."); |
"You may encounter some problems with the terminal."); |
| 1923 |
UTIL_get_lang_msg("MSG_SSH_ALLOC_TERMINAL_ERROR", pvar); |
UTIL_get_lang_msg("MSG_SSH_ALLOC_TERMINAL_ERROR", pvar); |
| 1980 |
if (deflateInit |
if (deflateInit |
| 1981 |
(&pvar->ssh_state.compress_stream, |
(&pvar->ssh_state.compress_stream, |
| 1982 |
pvar->ssh_state.compression_level) != Z_OK) { |
pvar->ssh_state.compression_level) != Z_OK) { |
| 1983 |
#ifdef I18N |
#ifndef NO_I18N |
| 1984 |
strcpy(pvar->ts->UIMsg, "An error occurred while setting up compression.\n" |
strcpy(pvar->ts->UIMsg, "An error occurred while setting up compression.\n" |
| 1985 |
"The connection will close."); |
"The connection will close."); |
| 1986 |
UTIL_get_lang_msg("MSG_SSH_SETUP_COMP_ERROR", pvar); |
UTIL_get_lang_msg("MSG_SSH_SETUP_COMP_ERROR", pvar); |
| 2015 |
pvar->ssh_state.decompress_stream.opaque = NULL; |
pvar->ssh_state.decompress_stream.opaque = NULL; |
| 2016 |
if (inflateInit(&pvar->ssh_state.decompress_stream) != Z_OK) { |
if (inflateInit(&pvar->ssh_state.decompress_stream) != Z_OK) { |
| 2017 |
deflateEnd(&pvar->ssh_state.compress_stream); |
deflateEnd(&pvar->ssh_state.compress_stream); |
| 2018 |
#ifdef I18N |
#ifndef NO_I18N |
| 2019 |
strcpy(pvar->ts->UIMsg, "An error occurred while setting up compression.\n" |
strcpy(pvar->ts->UIMsg, "An error occurred while setting up compression.\n" |
| 2020 |
"The connection will close."); |
"The connection will close."); |
| 2021 |
UTIL_get_lang_msg("MSG_SSH_SETUP_COMP_ERROR", pvar); |
UTIL_get_lang_msg("MSG_SSH_SETUP_COMP_ERROR", pvar); |
| 2130 |
|
|
| 2131 |
enque_simple_auth_handlers(pvar); |
enque_simple_auth_handlers(pvar); |
| 2132 |
} else { |
} else { |
| 2133 |
#ifdef I18N |
#ifndef NO_I18N |
| 2134 |
strcpy(pvar->ts->UIMsg, "An error occurred while decrypting the RSA challenge.\n" |
strcpy(pvar->ts->UIMsg, "An error occurred while decrypting the RSA challenge.\n" |
| 2135 |
"Perhaps the key file is corrupted."); |
"Perhaps the key file is corrupted."); |
| 2136 |
UTIL_get_lang_msg("MSG_SSH_DECRYPT_RSA_ERROR", pvar); |
UTIL_get_lang_msg("MSG_SSH_DECRYPT_RSA_ERROR", pvar); |
| 2285 |
break; |
break; |
| 2286 |
} |
} |
| 2287 |
default: |
default: |
| 2288 |
#ifdef I18N |
#ifndef NO_I18N |
| 2289 |
strcpy(pvar->ts->UIMsg, "Internal error: unsupported authentication method"); |
strcpy(pvar->ts->UIMsg, "Internal error: unsupported authentication method"); |
| 2290 |
UTIL_get_lang_msg("MSG_SSH_UNSUPPORT_AUTH_METHOD_ERROR", pvar); |
UTIL_get_lang_msg("MSG_SSH_UNSUPPORT_AUTH_METHOD_ERROR", pvar); |
| 2291 |
notify_fatal_error(pvar, pvar->ts->UIMsg); |
notify_fatal_error(pvar, pvar->ts->UIMsg); |
| 2606 |
|
|
| 2607 |
if (deflate(&pvar->ssh_state.compress_stream, Z_NO_FLUSH) != |
if (deflate(&pvar->ssh_state.compress_stream, Z_NO_FLUSH) != |
| 2608 |
Z_OK) { |
Z_OK) { |
| 2609 |
#ifdef I18N |
#ifndef NO_I18N |
| 2610 |
strcpy(pvar->ts->UIMsg, "Error compressing packet data"); |
strcpy(pvar->ts->UIMsg, "Error compressing packet data"); |
| 2611 |
UTIL_get_lang_msg("MSG_SSH_COMP_ERROR", pvar); |
UTIL_get_lang_msg("MSG_SSH_COMP_ERROR", pvar); |
| 2612 |
notify_fatal_error(pvar, pvar->ts->UIMsg); |
notify_fatal_error(pvar, pvar->ts->UIMsg); |
| 2622 |
|
|
| 2623 |
if (deflate(&pvar->ssh_state.compress_stream, Z_SYNC_FLUSH) != |
if (deflate(&pvar->ssh_state.compress_stream, Z_SYNC_FLUSH) != |
| 2624 |
Z_OK) { |
Z_OK) { |
| 2625 |
#ifdef I18N |
#ifndef NO_I18N |
| 2626 |
strcpy(pvar->ts->UIMsg, "Error compressing packet data"); |
strcpy(pvar->ts->UIMsg, "Error compressing packet data"); |
| 2627 |
UTIL_get_lang_msg("MSG_SSH_COMP_ERROR", pvar); |
UTIL_get_lang_msg("MSG_SSH_COMP_ERROR", pvar); |
| 2628 |
notify_fatal_error(pvar, pvar->ts->UIMsg); |
notify_fatal_error(pvar, pvar->ts->UIMsg); |
| 2700 |
|
|
| 2701 |
if (inflate(&pvar->ssh_state.decompress_stream, Z_SYNC_FLUSH) != |
if (inflate(&pvar->ssh_state.decompress_stream, Z_SYNC_FLUSH) != |
| 2702 |
Z_OK) { |
Z_OK) { |
| 2703 |
#ifdef I18N |
#ifndef NO_I18N |
| 2704 |
strcpy(pvar->ts->UIMsg, "Invalid compressed data in received packet"); |
strcpy(pvar->ts->UIMsg, "Invalid compressed data in received packet"); |
| 2705 |
UTIL_get_lang_msg("MSG_SSH_INVALID_COMPDATA_ERROR", pvar); |
UTIL_get_lang_msg("MSG_SSH_INVALID_COMPDATA_ERROR", pvar); |
| 2706 |
notify_fatal_error(pvar, pvar->ts->UIMsg); |
notify_fatal_error(pvar, pvar->ts->UIMsg); |
| 2732 |
pvar->ssh_state.compress_stream.total_out; |
pvar->ssh_state.compress_stream.total_out; |
| 2733 |
|
|
| 2734 |
if (total_out > 0) { |
if (total_out > 0) { |
| 2735 |
#ifdef I18N |
#ifndef NO_I18N |
| 2736 |
strcpy(pvar->ts->UIMsg, "level %d; ratio %.1f (%ld:%ld)"); |
strcpy(pvar->ts->UIMsg, "level %d; ratio %.1f (%ld:%ld)"); |
| 2737 |
UTIL_get_lang_msg("DLG_ABOUT_COMP_INFO", pvar); |
UTIL_get_lang_msg("DLG_ABOUT_COMP_INFO", pvar); |
| 2738 |
_snprintf(buf, sizeof(buf), pvar->ts->UIMsg, |
_snprintf(buf, sizeof(buf), pvar->ts->UIMsg, |
| 2746 |
total_out); |
total_out); |
| 2747 |
#endif |
#endif |
| 2748 |
} else { |
} else { |
| 2749 |
#ifdef I18N |
#ifndef NO_I18N |
| 2750 |
strcpy(pvar->ts->UIMsg, "level %d"); |
strcpy(pvar->ts->UIMsg, "level %d"); |
| 2751 |
UTIL_get_lang_msg("DLG_ABOUT_COMP_INFO2", pvar); |
UTIL_get_lang_msg("DLG_ABOUT_COMP_INFO2", pvar); |
| 2752 |
_snprintf(buf, sizeof(buf), pvar->ts->UIMsg, |
_snprintf(buf, sizeof(buf), pvar->ts->UIMsg, |
| 2757 |
#endif |
#endif |
| 2758 |
} |
} |
| 2759 |
} else { |
} else { |
| 2760 |
#ifdef I18N |
#ifndef NO_I18N |
| 2761 |
strcpy(pvar->ts->UIMsg, "none"); |
strcpy(pvar->ts->UIMsg, "none"); |
| 2762 |
UTIL_get_lang_msg("DLG_ABOUT_COMP_NONE", pvar); |
UTIL_get_lang_msg("DLG_ABOUT_COMP_NONE", pvar); |
| 2763 |
strcpy(buf, pvar->ts->UIMsg); |
strcpy(buf, pvar->ts->UIMsg); |
| 2777 |
pvar->ssh_state.decompress_stream.total_out; |
pvar->ssh_state.decompress_stream.total_out; |
| 2778 |
|
|
| 2779 |
if (total_in > 0) { |
if (total_in > 0) { |
| 2780 |
#ifdef I18N |
#ifndef NO_I18N |
| 2781 |
strcpy(pvar->ts->UIMsg, "level %d; ratio %.1f (%ld:%ld)"); |
strcpy(pvar->ts->UIMsg, "level %d; ratio %.1f (%ld:%ld)"); |
| 2782 |
UTIL_get_lang_msg("DLG_ABOUT_COMP_INFO", pvar); |
UTIL_get_lang_msg("DLG_ABOUT_COMP_INFO", pvar); |
| 2783 |
_snprintf(buf2, sizeof(buf2), pvar->ts->UIMsg, |
_snprintf(buf2, sizeof(buf2), pvar->ts->UIMsg, |
| 2791 |
total_in); |
total_in); |
| 2792 |
#endif |
#endif |
| 2793 |
} else { |
} else { |
| 2794 |
#ifdef I18N |
#ifndef NO_I18N |
| 2795 |
strcpy(pvar->ts->UIMsg, "level %d"); |
strcpy(pvar->ts->UIMsg, "level %d"); |
| 2796 |
UTIL_get_lang_msg("DLG_ABOUT_COMP_INFO2", pvar); |
UTIL_get_lang_msg("DLG_ABOUT_COMP_INFO2", pvar); |
| 2797 |
_snprintf(buf2, sizeof(buf2), pvar->ts->UIMsg, |
_snprintf(buf2, sizeof(buf2), pvar->ts->UIMsg, |
| 2802 |
#endif |
#endif |
| 2803 |
} |
} |
| 2804 |
} else { |
} else { |
| 2805 |
#ifdef I18N |
#ifndef NO_I18N |
| 2806 |
strcpy(pvar->ts->UIMsg, "none"); |
strcpy(pvar->ts->UIMsg, "none"); |
| 2807 |
UTIL_get_lang_msg("DLG_ABOUT_COMP_NONE", pvar); |
UTIL_get_lang_msg("DLG_ABOUT_COMP_NONE", pvar); |
| 2808 |
strcpy(buf2, pvar->ts->UIMsg); |
strcpy(buf2, pvar->ts->UIMsg); |
| 2812 |
} |
} |
| 2813 |
buf2[sizeof(buf2) - 1] = 0; |
buf2[sizeof(buf2) - 1] = 0; |
| 2814 |
|
|
| 2815 |
#ifdef I18N |
#ifndef NO_I18N |
| 2816 |
strcpy(pvar->ts->UIMsg, "Upstream %s; Downstream %s"); |
strcpy(pvar->ts->UIMsg, "Upstream %s; Downstream %s"); |
| 2817 |
UTIL_get_lang_msg("DLG_ABOUT_COMP_UPDOWN", pvar); |
UTIL_get_lang_msg("DLG_ABOUT_COMP_UPDOWN", pvar); |
| 2818 |
_snprintf(dest, len, pvar->ts->UIMsg, buf, buf2); |
_snprintf(dest, len, pvar->ts->UIMsg, buf, buf2); |
| 2963 |
pvar->ssh_state.outbuflen - 12; |
pvar->ssh_state.outbuflen - 12; |
| 2964 |
|
|
| 2965 |
if (deflate(&pvar->ssh_state.compress_stream, Z_NO_FLUSH) != Z_OK) { |
if (deflate(&pvar->ssh_state.compress_stream, Z_NO_FLUSH) != Z_OK) { |
| 2966 |
#ifdef I18N |
#ifndef NO_I18N |
| 2967 |
strcpy(pvar->ts->UIMsg, "Error compressing packet data"); |
strcpy(pvar->ts->UIMsg, "Error compressing packet data"); |
| 2968 |
UTIL_get_lang_msg("MSG_SSH_COMP_ERROR", pvar); |
UTIL_get_lang_msg("MSG_SSH_COMP_ERROR", pvar); |
| 2969 |
notify_fatal_error(pvar, pvar->ts->UIMsg); |
notify_fatal_error(pvar, pvar->ts->UIMsg); |
| 2979 |
|
|
| 2980 |
if (deflate(&pvar->ssh_state.compress_stream, Z_SYNC_FLUSH) != |
if (deflate(&pvar->ssh_state.compress_stream, Z_SYNC_FLUSH) != |
| 2981 |
Z_OK) { |
Z_OK) { |
| 2982 |
#ifdef I18N |
#ifndef NO_I18N |
| 2983 |
strcpy(pvar->ts->UIMsg, "Error compressing packet data"); |
strcpy(pvar->ts->UIMsg, "Error compressing packet data"); |
| 2984 |
UTIL_get_lang_msg("MSG_SSH_COMP_ERROR", pvar); |
UTIL_get_lang_msg("MSG_SSH_COMP_ERROR", pvar); |
| 2985 |
notify_fatal_error(pvar, pvar->ts->UIMsg); |
notify_fatal_error(pvar, pvar->ts->UIMsg); |
| 3353 |
// changed window size from 128KB to 32KB. (2006.3.6 yutaka) |
// changed window size from 128KB to 32KB. (2006.3.6 yutaka) |
| 3354 |
c = ssh2_channel_new(CHAN_TCP_PACKET_DEFAULT, CHAN_TCP_PACKET_DEFAULT, TYPE_PORTFWD, local_channel_num); |
c = ssh2_channel_new(CHAN_TCP_PACKET_DEFAULT, CHAN_TCP_PACKET_DEFAULT, TYPE_PORTFWD, local_channel_num); |
| 3355 |
if (c == NULL) { |
if (c == NULL) { |
| 3356 |
#ifdef I18N |
#ifndef NO_I18N |
| 3357 |
strcpy(pvar->ts->UIMsg, "Could not open new channel. TTSSH is already opening too many channels."); |
strcpy(pvar->ts->UIMsg, "Could not open new channel. TTSSH is already opening too many channels."); |
| 3358 |
UTIL_get_lang_msg("MSG_SSH_NO_FREE_CHANNEL", pvar); |
UTIL_get_lang_msg("MSG_SSH_NO_FREE_CHANNEL", pvar); |
| 3359 |
notify_nonfatal_error(pvar, pvar->ts->UIMsg); |
notify_nonfatal_error(pvar, pvar->ts->UIMsg); |
| 6457 |
// changed window size from 64KB to 32KB. (2006.3.6 yutaka) |
// changed window size from 64KB to 32KB. (2006.3.6 yutaka) |
| 6458 |
c = ssh2_channel_new(CHAN_SES_PACKET_DEFAULT, CHAN_SES_PACKET_DEFAULT, TYPE_SHELL, -1); |
c = ssh2_channel_new(CHAN_SES_PACKET_DEFAULT, CHAN_SES_PACKET_DEFAULT, TYPE_SHELL, -1); |
| 6459 |
if (c == NULL) { |
if (c == NULL) { |
| 6460 |
#ifdef I18N |
#ifndef NO_I18N |
| 6461 |
strcpy(pvar->ts->UIMsg, "Could not open new channel. TTSSH is already opening too many channels."); |
strcpy(pvar->ts->UIMsg, "Could not open new channel. TTSSH is already opening too many channels."); |
| 6462 |
UTIL_get_lang_msg("MSG_SSH_NO_FREE_CHANNEL", pvar); |
UTIL_get_lang_msg("MSG_SSH_NO_FREE_CHANNEL", pvar); |
| 6463 |
notify_fatal_error(pvar, pvar->ts->UIMsg); |
notify_fatal_error(pvar, pvar->ts->UIMsg); |
| 6554 |
|
|
| 6555 |
if (pvar->ssh2_autologin == 1) { |
if (pvar->ssh2_autologin == 1) { |
| 6556 |
// SSH2自動ログインが有効の場合は、リトライは行わない。(2004.12.4 yutaka) |
// SSH2自動ログインが有効の場合は、リトライは行わない。(2004.12.4 yutaka) |
| 6557 |
#ifdef I18N |
#ifndef NO_I18N |
| 6558 |
strcpy(pvar->ts->UIMsg, "SSH2 autologin error: user authentication failed"); |
strcpy(pvar->ts->UIMsg, "SSH2 autologin error: user authentication failed"); |
| 6559 |
UTIL_get_lang_msg("MSG_SSH_AUTH_FAILURE_ERROR", pvar); |
UTIL_get_lang_msg("MSG_SSH_AUTH_FAILURE_ERROR", pvar); |
| 6560 |
notify_fatal_error(pvar, pvar->ts->UIMsg); |
notify_fatal_error(pvar, pvar->ts->UIMsg); |
| 6847 |
|
|
| 6848 |
cstring = buffer_get_string(&data, NULL); |
cstring = buffer_get_string(&data, NULL); |
| 6849 |
|
|
| 6850 |
#ifdef I18N |
#ifndef NO_I18N |
| 6851 |
strcpy(pvar->ts->UIMsg, "SSH2_MSG_CHANNEL_OPEN_FAILURE was received.\r\nchannel [%d]: reason: %s(%d) message: %s"); |
strcpy(pvar->ts->UIMsg, "SSH2_MSG_CHANNEL_OPEN_FAILURE was received.\r\nchannel [%d]: reason: %s(%d) message: %s"); |
| 6852 |
UTIL_get_lang_msg("MSG_SSH_CHANNEL_OPEN_ERROR", pvar); |
UTIL_get_lang_msg("MSG_SSH_CHANNEL_OPEN_ERROR", pvar); |
| 6853 |
_snprintf(tmpbuf, sizeof(tmpbuf), pvar->ts->UIMsg, |
_snprintf(tmpbuf, sizeof(tmpbuf), pvar->ts->UIMsg, |
| 7197 |
// changed window size from 128KB to 32KB. (2006.3.6 yutaka) |
// changed window size from 128KB to 32KB. (2006.3.6 yutaka) |
| 7198 |
c = ssh2_channel_new(CHAN_TCP_PACKET_DEFAULT, CHAN_TCP_PACKET_DEFAULT, TYPE_PORTFWD, chan_num); |
c = ssh2_channel_new(CHAN_TCP_PACKET_DEFAULT, CHAN_TCP_PACKET_DEFAULT, TYPE_PORTFWD, chan_num); |
| 7199 |
if (c == NULL) { |
if (c == NULL) { |
| 7200 |
#ifdef I18N |
#ifndef NO_I18N |
| 7201 |
strcpy(pvar->ts->UIMsg, "Could not open new channel. TTSSH is already opening too many channels."); |
strcpy(pvar->ts->UIMsg, "Could not open new channel. TTSSH is already opening too many channels."); |
| 7202 |
UTIL_get_lang_msg("MSG_SSH_NO_FREE_CHANNEL", pvar); |
UTIL_get_lang_msg("MSG_SSH_NO_FREE_CHANNEL", pvar); |
| 7203 |
notify_nonfatal_error(pvar, pvar->ts->UIMsg); |
notify_nonfatal_error(pvar, pvar->ts->UIMsg); |
| 7228 |
// changed window size from 128KB to 32KB. (2006.3.6 yutaka) |
// changed window size from 128KB to 32KB. (2006.3.6 yutaka) |
| 7229 |
c = ssh2_channel_new(CHAN_TCP_PACKET_DEFAULT, CHAN_TCP_PACKET_DEFAULT, TYPE_PORTFWD, chan_num); |
c = ssh2_channel_new(CHAN_TCP_PACKET_DEFAULT, CHAN_TCP_PACKET_DEFAULT, TYPE_PORTFWD, chan_num); |
| 7230 |
if (c == NULL) { |
if (c == NULL) { |
| 7231 |
#ifdef I18N |
#ifndef NO_I18N |
| 7232 |
strcpy(pvar->ts->UIMsg, "Could not open new channel. TTSSH is already opening too many channels."); |
strcpy(pvar->ts->UIMsg, "Could not open new channel. TTSSH is already opening too many channels."); |
| 7233 |
UTIL_get_lang_msg("MSG_SSH_NO_FREE_CHANNEL", pvar); |
UTIL_get_lang_msg("MSG_SSH_NO_FREE_CHANNEL", pvar); |
| 7234 |
notify_nonfatal_error(pvar, pvar->ts->UIMsg); |
notify_nonfatal_error(pvar, pvar->ts->UIMsg); |
| 7415 |
|
|
| 7416 |
/* |
/* |
| 7417 |
* $Log: not supported by cvs2svn $ |
* $Log: not supported by cvs2svn $ |
| 7418 |
|
* Revision 1.78 2007/05/01 13:45:53 maya |
| 7419 |
|
* チャネルの解放漏れを修正した。 |
| 7420 |
|
* |
| 7421 |
* Revision 1.77 2007/04/27 12:56:47 yutakapon |
* Revision 1.77 2007/04/27 12:56:47 yutakapon |
| 7422 |
* ユーザ認証リストをもらったら、認証ダイアログのラジオボタンを更新するようにした。 |
* ユーザ認証リストをもらったら、認証ダイアログのラジオボタンを更新するようにした。 |
| 7423 |
* |
* |