diff options
Diffstat (limited to 'sshd.c')
-rw-r--r-- | sshd.c | 28 |
1 files changed, 14 insertions, 14 deletions
@@ -258,11 +258,11 @@ sighup_handler(int sig) | |||
258 | static void | 258 | static void |
259 | sighup_restart(void) | 259 | sighup_restart(void) |
260 | { | 260 | { |
261 | logit("Received SIGHUP; restarting."); | 261 | log("Received SIGHUP; restarting."); |
262 | close_listen_socks(); | 262 | close_listen_socks(); |
263 | close_startup_pipes(); | 263 | close_startup_pipes(); |
264 | execv(saved_argv[0], saved_argv); | 264 | execv(saved_argv[0], saved_argv); |
265 | logit("RESTART FAILED: av[0]='%.100s', error: %.100s.", saved_argv[0], | 265 | log("RESTART FAILED: av[0]='%.100s', error: %.100s.", saved_argv[0], |
266 | strerror(errno)); | 266 | strerror(errno)); |
267 | exit(1); | 267 | exit(1); |
268 | } | 268 | } |
@@ -376,7 +376,7 @@ sshd_exchange_identification(int sock_in, int sock_out) | |||
376 | if (atomicio(write, sock_out, server_version_string, | 376 | if (atomicio(write, sock_out, server_version_string, |
377 | strlen(server_version_string)) | 377 | strlen(server_version_string)) |
378 | != strlen(server_version_string)) { | 378 | != strlen(server_version_string)) { |
379 | logit("Could not write ident string to %s", get_remote_ipaddr()); | 379 | log("Could not write ident string to %s", get_remote_ipaddr()); |
380 | fatal_cleanup(); | 380 | fatal_cleanup(); |
381 | } | 381 | } |
382 | 382 | ||
@@ -384,7 +384,7 @@ sshd_exchange_identification(int sock_in, int sock_out) | |||
384 | memset(buf, 0, sizeof(buf)); | 384 | memset(buf, 0, sizeof(buf)); |
385 | for (i = 0; i < sizeof(buf) - 1; i++) { | 385 | for (i = 0; i < sizeof(buf) - 1; i++) { |
386 | if (atomicio(read, sock_in, &buf[i], 1) != 1) { | 386 | if (atomicio(read, sock_in, &buf[i], 1) != 1) { |
387 | logit("Did not receive identification string from %s", | 387 | log("Did not receive identification string from %s", |
388 | get_remote_ipaddr()); | 388 | get_remote_ipaddr()); |
389 | fatal_cleanup(); | 389 | fatal_cleanup(); |
390 | } | 390 | } |
@@ -415,7 +415,7 @@ sshd_exchange_identification(int sock_in, int sock_out) | |||
415 | (void) atomicio(write, sock_out, s, strlen(s)); | 415 | (void) atomicio(write, sock_out, s, strlen(s)); |
416 | close(sock_in); | 416 | close(sock_in); |
417 | close(sock_out); | 417 | close(sock_out); |
418 | logit("Bad protocol version identification '%.100s' from %s", | 418 | log("Bad protocol version identification '%.100s' from %s", |
419 | client_version_string, get_remote_ipaddr()); | 419 | client_version_string, get_remote_ipaddr()); |
420 | fatal_cleanup(); | 420 | fatal_cleanup(); |
421 | } | 421 | } |
@@ -425,13 +425,13 @@ sshd_exchange_identification(int sock_in, int sock_out) | |||
425 | compat_datafellows(remote_version); | 425 | compat_datafellows(remote_version); |
426 | 426 | ||
427 | if (datafellows & SSH_BUG_PROBE) { | 427 | if (datafellows & SSH_BUG_PROBE) { |
428 | logit("probed from %s with %s. Don't panic.", | 428 | log("probed from %s with %s. Don't panic.", |
429 | get_remote_ipaddr(), client_version_string); | 429 | get_remote_ipaddr(), client_version_string); |
430 | fatal_cleanup(); | 430 | fatal_cleanup(); |
431 | } | 431 | } |
432 | 432 | ||
433 | if (datafellows & SSH_BUG_SCANNER) { | 433 | if (datafellows & SSH_BUG_SCANNER) { |
434 | logit("scanned from %s with %s. Don't panic.", | 434 | log("scanned from %s with %s. Don't panic.", |
435 | get_remote_ipaddr(), client_version_string); | 435 | get_remote_ipaddr(), client_version_string); |
436 | fatal_cleanup(); | 436 | fatal_cleanup(); |
437 | } | 437 | } |
@@ -476,7 +476,7 @@ sshd_exchange_identification(int sock_in, int sock_out) | |||
476 | (void) atomicio(write, sock_out, s, strlen(s)); | 476 | (void) atomicio(write, sock_out, s, strlen(s)); |
477 | close(sock_in); | 477 | close(sock_in); |
478 | close(sock_out); | 478 | close(sock_out); |
479 | logit("Protocol major versions differ for %s: %.200s vs. %.200s", | 479 | log("Protocol major versions differ for %s: %.200s vs. %.200s", |
480 | get_remote_ipaddr(), | 480 | get_remote_ipaddr(), |
481 | server_version_string, client_version_string); | 481 | server_version_string, client_version_string); |
482 | fatal_cleanup(); | 482 | fatal_cleanup(); |
@@ -1010,15 +1010,15 @@ main(int ac, char **av) | |||
1010 | key_type(key)); | 1010 | key_type(key)); |
1011 | } | 1011 | } |
1012 | if ((options.protocol & SSH_PROTO_1) && !sensitive_data.have_ssh1_key) { | 1012 | if ((options.protocol & SSH_PROTO_1) && !sensitive_data.have_ssh1_key) { |
1013 | logit("Disabling protocol version 1. Could not load host key"); | 1013 | log("Disabling protocol version 1. Could not load host key"); |
1014 | options.protocol &= ~SSH_PROTO_1; | 1014 | options.protocol &= ~SSH_PROTO_1; |
1015 | } | 1015 | } |
1016 | if ((options.protocol & SSH_PROTO_2) && !sensitive_data.have_ssh2_key) { | 1016 | if ((options.protocol & SSH_PROTO_2) && !sensitive_data.have_ssh2_key) { |
1017 | logit("Disabling protocol version 2. Could not load host key"); | 1017 | log("Disabling protocol version 2. Could not load host key"); |
1018 | options.protocol &= ~SSH_PROTO_2; | 1018 | options.protocol &= ~SSH_PROTO_2; |
1019 | } | 1019 | } |
1020 | if (!(options.protocol & (SSH_PROTO_1|SSH_PROTO_2))) { | 1020 | if (!(options.protocol & (SSH_PROTO_1|SSH_PROTO_2))) { |
1021 | logit("sshd: no hostkeys available -- exiting."); | 1021 | log("sshd: no hostkeys available -- exiting."); |
1022 | exit(1); | 1022 | exit(1); |
1023 | } | 1023 | } |
1024 | 1024 | ||
@@ -1186,7 +1186,7 @@ main(int ac, char **av) | |||
1186 | num_listen_socks++; | 1186 | num_listen_socks++; |
1187 | 1187 | ||
1188 | /* Start listening on the port. */ | 1188 | /* Start listening on the port. */ |
1189 | logit("Server listening on %s port %s.", ntop, strport); | 1189 | log("Server listening on %s port %s.", ntop, strport); |
1190 | if (listen(listen_sock, 5) < 0) | 1190 | if (listen(listen_sock, 5) < 0) |
1191 | fatal("listen: %.100s", strerror(errno)); | 1191 | fatal("listen: %.100s", strerror(errno)); |
1192 | 1192 | ||
@@ -1262,7 +1262,7 @@ main(int ac, char **av) | |||
1262 | if (ret < 0 && errno != EINTR) | 1262 | if (ret < 0 && errno != EINTR) |
1263 | error("select: %.100s", strerror(errno)); | 1263 | error("select: %.100s", strerror(errno)); |
1264 | if (received_sigterm) { | 1264 | if (received_sigterm) { |
1265 | logit("Received signal %d; terminating.", | 1265 | log("Received signal %d; terminating.", |
1266 | (int) received_sigterm); | 1266 | (int) received_sigterm); |
1267 | close_listen_socks(); | 1267 | close_listen_socks(); |
1268 | unlink(options.pid_file); | 1268 | unlink(options.pid_file); |
@@ -1750,7 +1750,7 @@ do_ssh1_kex(void) | |||
1750 | u_char *buf = xmalloc(bytes); | 1750 | u_char *buf = xmalloc(bytes); |
1751 | MD5_CTX md; | 1751 | MD5_CTX md; |
1752 | 1752 | ||
1753 | logit("do_connection: generating a fake encryption key"); | 1753 | log("do_connection: generating a fake encryption key"); |
1754 | BN_bn2bin(session_key_int, buf); | 1754 | BN_bn2bin(session_key_int, buf); |
1755 | MD5_Init(&md); | 1755 | MD5_Init(&md); |
1756 | MD5_Update(&md, buf, bytes); | 1756 | MD5_Update(&md, buf, bytes); |