diff options
-rw-r--r-- | sshd.c | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: sshd.c,v 1.482 2017/02/06 09:22:51 djm Exp $ */ | 1 | /* $OpenBSD: sshd.c,v 1.483 2017/02/24 03:16:34 djm Exp $ */ |
2 | /* | 2 | /* |
3 | * Author: Tatu Ylonen <ylo@cs.hut.fi> | 3 | * Author: Tatu Ylonen <ylo@cs.hut.fi> |
4 | * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland | 4 | * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland |
@@ -1046,6 +1046,11 @@ server_listen(void) | |||
1046 | close(listen_sock); | 1046 | close(listen_sock); |
1047 | continue; | 1047 | continue; |
1048 | } | 1048 | } |
1049 | if (fcntl(listen_sock, F_SETFD, FD_CLOEXEC) == -1) { | ||
1050 | verbose("socket: CLOEXEC: %s", strerror(errno)); | ||
1051 | close(listen_sock); | ||
1052 | continue; | ||
1053 | } | ||
1049 | /* | 1054 | /* |
1050 | * Set socket options. | 1055 | * Set socket options. |
1051 | * Allow local port reuse in TIME_WAIT. | 1056 | * Allow local port reuse in TIME_WAIT. |