diff options
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | sshd.c | 29 |
2 files changed, 21 insertions, 13 deletions
@@ -85,6 +85,9 @@ | |||
85 | - itojun@cvs.openbsd.org 2001/06/23 17:48:18 | 85 | - itojun@cvs.openbsd.org 2001/06/23 17:48:18 |
86 | [sftp.1 ssh.1 sshd.8 ssh-keyscan.1] | 86 | [sftp.1 ssh.1 sshd.8 ssh-keyscan.1] |
87 | kill whitespace at EOL. | 87 | kill whitespace at EOL. |
88 | - markus@cvs.openbsd.org 2001/06/23 19:12:43 | ||
89 | [sshd.c] | ||
90 | pidfile/sigterm race; bbraun@synack.net | ||
88 | 91 | ||
89 | 20010622 | 92 | 20010622 |
90 | - (stevesk) handle systems without pw_expire and pw_change. | 93 | - (stevesk) handle systems without pw_expire and pw_change. |
@@ -5769,4 +5772,4 @@ | |||
5769 | - Wrote replacements for strlcpy and mkdtemp | 5772 | - Wrote replacements for strlcpy and mkdtemp |
5770 | - Released 1.0pre1 | 5773 | - Released 1.0pre1 |
5771 | 5774 | ||
5772 | $Id: ChangeLog,v 1.1317 2001/06/25 05:08:11 mouring Exp $ | 5775 | $Id: ChangeLog,v 1.1318 2001/06/25 05:10:20 mouring Exp $ |
@@ -40,7 +40,7 @@ | |||
40 | */ | 40 | */ |
41 | 41 | ||
42 | #include "includes.h" | 42 | #include "includes.h" |
43 | RCSID("$OpenBSD: sshd.c,v 1.200 2001/06/23 15:12:21 itojun Exp $"); | 43 | RCSID("$OpenBSD: sshd.c,v 1.201 2001/06/23 19:12:43 markus Exp $"); |
44 | 44 | ||
45 | #include <openssl/dh.h> | 45 | #include <openssl/dh.h> |
46 | #include <openssl/bn.h> | 46 | #include <openssl/bn.h> |
@@ -876,6 +876,22 @@ main(int ac, char **av) | |||
876 | if (!num_listen_socks) | 876 | if (!num_listen_socks) |
877 | fatal("Cannot bind any address."); | 877 | fatal("Cannot bind any address."); |
878 | 878 | ||
879 | if (options.protocol & SSH_PROTO_1) | ||
880 | generate_ephemeral_server_key(); | ||
881 | |||
882 | /* | ||
883 | * Arrange to restart on SIGHUP. The handler needs | ||
884 | * listen_sock. | ||
885 | */ | ||
886 | signal(SIGHUP, sighup_handler); | ||
887 | |||
888 | signal(SIGTERM, sigterm_handler); | ||
889 | signal(SIGQUIT, sigterm_handler); | ||
890 | |||
891 | /* Arrange SIGCHLD to be caught. */ | ||
892 | signal(SIGCHLD, main_sigchld_handler); | ||
893 | |||
894 | /* Write out the pid file after the sigterm handler is setup */ | ||
879 | if (!debug_flag) { | 895 | if (!debug_flag) { |
880 | /* | 896 | /* |
881 | * Record our pid in /var/run/sshd.pid to make it | 897 | * Record our pid in /var/run/sshd.pid to make it |
@@ -890,17 +906,6 @@ main(int ac, char **av) | |||
890 | fclose(f); | 906 | fclose(f); |
891 | } | 907 | } |
892 | } | 908 | } |
893 | if (options.protocol & SSH_PROTO_1) | ||
894 | generate_ephemeral_server_key(); | ||
895 | |||
896 | /* Arrange to restart on SIGHUP. The handler needs listen_sock. */ | ||
897 | signal(SIGHUP, sighup_handler); | ||
898 | |||
899 | signal(SIGTERM, sigterm_handler); | ||
900 | signal(SIGQUIT, sigterm_handler); | ||
901 | |||
902 | /* Arrange SIGCHLD to be caught. */ | ||
903 | signal(SIGCHLD, main_sigchld_handler); | ||
904 | 909 | ||
905 | /* setup fd set for listen */ | 910 | /* setup fd set for listen */ |
906 | fdset = NULL; | 911 | fdset = NULL; |