- markus@cvs.openbsd.org 2001/06/23 19:12:43
[sshd.c] pidfile/sigterm race; bbraun@synack.net
This commit is contained in:
parent
2464322d7e
commit
980978639c
|
@ -85,6 +85,9 @@
|
|||
- itojun@cvs.openbsd.org 2001/06/23 17:48:18
|
||||
[sftp.1 ssh.1 sshd.8 ssh-keyscan.1]
|
||||
kill whitespace at EOL.
|
||||
- markus@cvs.openbsd.org 2001/06/23 19:12:43
|
||||
[sshd.c]
|
||||
pidfile/sigterm race; bbraun@synack.net
|
||||
|
||||
20010622
|
||||
- (stevesk) handle systems without pw_expire and pw_change.
|
||||
|
@ -5769,4 +5772,4 @@
|
|||
- Wrote replacements for strlcpy and mkdtemp
|
||||
- Released 1.0pre1
|
||||
|
||||
$Id: ChangeLog,v 1.1317 2001/06/25 05:08:11 mouring Exp $
|
||||
$Id: ChangeLog,v 1.1318 2001/06/25 05:10:20 mouring Exp $
|
||||
|
|
29
sshd.c
29
sshd.c
|
@ -40,7 +40,7 @@
|
|||
*/
|
||||
|
||||
#include "includes.h"
|
||||
RCSID("$OpenBSD: sshd.c,v 1.200 2001/06/23 15:12:21 itojun Exp $");
|
||||
RCSID("$OpenBSD: sshd.c,v 1.201 2001/06/23 19:12:43 markus Exp $");
|
||||
|
||||
#include <openssl/dh.h>
|
||||
#include <openssl/bn.h>
|
||||
|
@ -876,6 +876,22 @@ main(int ac, char **av)
|
|||
if (!num_listen_socks)
|
||||
fatal("Cannot bind any address.");
|
||||
|
||||
if (options.protocol & SSH_PROTO_1)
|
||||
generate_ephemeral_server_key();
|
||||
|
||||
/*
|
||||
* Arrange to restart on SIGHUP. The handler needs
|
||||
* listen_sock.
|
||||
*/
|
||||
signal(SIGHUP, sighup_handler);
|
||||
|
||||
signal(SIGTERM, sigterm_handler);
|
||||
signal(SIGQUIT, sigterm_handler);
|
||||
|
||||
/* Arrange SIGCHLD to be caught. */
|
||||
signal(SIGCHLD, main_sigchld_handler);
|
||||
|
||||
/* Write out the pid file after the sigterm handler is setup */
|
||||
if (!debug_flag) {
|
||||
/*
|
||||
* Record our pid in /var/run/sshd.pid to make it
|
||||
|
@ -890,17 +906,6 @@ main(int ac, char **av)
|
|||
fclose(f);
|
||||
}
|
||||
}
|
||||
if (options.protocol & SSH_PROTO_1)
|
||||
generate_ephemeral_server_key();
|
||||
|
||||
/* Arrange to restart on SIGHUP. The handler needs listen_sock. */
|
||||
signal(SIGHUP, sighup_handler);
|
||||
|
||||
signal(SIGTERM, sigterm_handler);
|
||||
signal(SIGQUIT, sigterm_handler);
|
||||
|
||||
/* Arrange SIGCHLD to be caught. */
|
||||
signal(SIGCHLD, main_sigchld_handler);
|
||||
|
||||
/* setup fd set for listen */
|
||||
fdset = NULL;
|
||||
|
|
Loading…
Reference in New Issue