diff options
Diffstat (limited to 'sshd.c')
-rw-r--r-- | sshd.c | 13 |
1 files changed, 9 insertions, 4 deletions
@@ -376,7 +376,7 @@ sshd_exchange_identification(int sock_in, int sock_out) | |||
376 | major = PROTOCOL_MAJOR_1; | 376 | major = PROTOCOL_MAJOR_1; |
377 | minor = PROTOCOL_MINOR_1; | 377 | minor = PROTOCOL_MINOR_1; |
378 | } | 378 | } |
379 | snprintf(buf, sizeof buf, "SSH-%d.%d-%.100s\n", major, minor, SSH_VERSION); | 379 | snprintf(buf, sizeof buf, "SSH-%d.%d-%.100s\n", major, minor, SSH_RELEASE); |
380 | server_version_string = xstrdup(buf); | 380 | server_version_string = xstrdup(buf); |
381 | 381 | ||
382 | /* Send our protocol version identification. */ | 382 | /* Send our protocol version identification. */ |
@@ -949,7 +949,12 @@ main(int ac, char **av) | |||
949 | /* ignored */ | 949 | /* ignored */ |
950 | break; | 950 | break; |
951 | case 'q': | 951 | case 'q': |
952 | options.log_level = SYSLOG_LEVEL_QUIET; | 952 | if (options.log_level == SYSLOG_LEVEL_QUIET) { |
953 | options.log_level = SYSLOG_LEVEL_SILENT; | ||
954 | } | ||
955 | else if (options.log_level != SYSLOG_LEVEL_SILENT) { | ||
956 | options.log_level = SYSLOG_LEVEL_QUIET; | ||
957 | } | ||
953 | break; | 958 | break; |
954 | case 'b': | 959 | case 'b': |
955 | options.server_key_bits = atoi(optarg); | 960 | options.server_key_bits = atoi(optarg); |
@@ -1300,7 +1305,7 @@ main(int ac, char **av) | |||
1300 | 1305 | ||
1301 | /* Bind the socket to the desired port. */ | 1306 | /* Bind the socket to the desired port. */ |
1302 | if (bind(listen_sock, ai->ai_addr, ai->ai_addrlen) < 0) { | 1307 | if (bind(listen_sock, ai->ai_addr, ai->ai_addrlen) < 0) { |
1303 | if (!ai->ai_next) | 1308 | if (!num_listen_socks && !ai->ai_next) |
1304 | error("Bind to port %s on %s failed: %.200s.", | 1309 | error("Bind to port %s on %s failed: %.200s.", |
1305 | strport, ntop, strerror(errno)); | 1310 | strport, ntop, strerror(errno)); |
1306 | close(listen_sock); | 1311 | close(listen_sock); |
@@ -1625,7 +1630,7 @@ main(int ac, char **av) | |||
1625 | * Register our connection. This turns encryption off because we do | 1630 | * Register our connection. This turns encryption off because we do |
1626 | * not have a key. | 1631 | * not have a key. |
1627 | */ | 1632 | */ |
1628 | packet_set_connection(sock_in, sock_out); | 1633 | packet_set_connection(sock_in, sock_out, -1); |
1629 | 1634 | ||
1630 | remote_port = get_remote_port(); | 1635 | remote_port = get_remote_port(); |
1631 | remote_ip = get_remote_ipaddr(); | 1636 | remote_ip = get_remote_ipaddr(); |