summaryrefslogtreecommitdiff
path: root/sshd.c
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2010-01-30 17:30:04 +1100
committerDamien Miller <djm@mindrot.org>2010-01-30 17:30:04 +1100
commit133d9d313e1058ed5d028abb450de253c00a4c5d (patch)
tree709a2e0a70aca69278bec092ea6135d5d5ccdb4f /sshd.c
parent36f57ebf3b5ecf697c5ae868dbc0992792890e06 (diff)
- djm@cvs.openbsd.org 2010/01/29 00:20:41
[sshd.c] set FD_CLOEXEC on sock_in/sock_out; bz#1706 from jchadima AT redhat.com ok dtucker@
Diffstat (limited to 'sshd.c')
-rw-r--r--sshd.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/sshd.c b/sshd.c
index d84db897c..bf2e76cc8 100644
--- a/sshd.c
+++ b/sshd.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: sshd.c,v 1.371 2010/01/13 03:48:13 djm Exp $ */ 1/* $OpenBSD: sshd.c,v 1.372 2010/01/29 00:20:41 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
@@ -1748,6 +1748,10 @@ main(int ac, char **av)
1748 sock_in, sock_out, newsock, startup_pipe, config_s[0]); 1748 sock_in, sock_out, newsock, startup_pipe, config_s[0]);
1749 } 1749 }
1750 1750
1751 /* Executed child processes don't need these. */
1752 fcntl(sock_out, F_SETFD, FD_CLOEXEC);
1753 fcntl(sock_in, F_SETFD, FD_CLOEXEC);
1754
1751 /* 1755 /*
1752 * Disable the key regeneration alarm. We will not regenerate the 1756 * Disable the key regeneration alarm. We will not regenerate the
1753 * key since we are no longer in a position to give it to anyone. We 1757 * key since we are no longer in a position to give it to anyone. We