upstream commit
might as well set the listener socket CLOEXEC Upstream-ID: 9c538433d6a0ca79f5f21decc5620e46fb68ab57
This commit is contained in:
parent
d549919055
commit
8071a6924c
7
sshd.c
7
sshd.c
|
@ -1,4 +1,4 @@
|
||||||
/* $OpenBSD: sshd.c,v 1.482 2017/02/06 09:22:51 djm Exp $ */
|
/* $OpenBSD: sshd.c,v 1.483 2017/02/24 03:16:34 djm Exp $ */
|
||||||
/*
|
/*
|
||||||
* Author: Tatu Ylonen <ylo@cs.hut.fi>
|
* Author: Tatu Ylonen <ylo@cs.hut.fi>
|
||||||
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
|
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
|
||||||
|
@ -1046,6 +1046,11 @@ server_listen(void)
|
||||||
close(listen_sock);
|
close(listen_sock);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
if (fcntl(listen_sock, F_SETFD, FD_CLOEXEC) == -1) {
|
||||||
|
verbose("socket: CLOEXEC: %s", strerror(errno));
|
||||||
|
close(listen_sock);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
/*
|
/*
|
||||||
* Set socket options.
|
* Set socket options.
|
||||||
* Allow local port reuse in TIME_WAIT.
|
* Allow local port reuse in TIME_WAIT.
|
||||||
|
|
Loading…
Reference in New Issue