diff options
author | Damien Miller <djm@cvs.openbsd.org> | 2004-08-28 01:01:49 +0000 |
---|---|---|
committer | Damien Miller <djm@cvs.openbsd.org> | 2004-08-28 01:01:49 +0000 |
commit | 49aadd6c04a0443fb3b0aba48b4d832997a11f11 (patch) | |
tree | 8d18e06f7476b484c377313dcb964985b87a97e9 | |
parent | 050bfb61419758ca2324340b03133d345f554ab0 (diff) |
don't erroneously close stdin for !reexec case, from Dave Johnson; ok markus@
-rw-r--r-- | usr.bin/ssh/sshd.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/usr.bin/ssh/sshd.c b/usr.bin/ssh/sshd.c index 191797c81a6..cb6622578bd 100644 --- a/usr.bin/ssh/sshd.c +++ b/usr.bin/ssh/sshd.c @@ -42,7 +42,7 @@ */ #include "includes.h" -RCSID("$OpenBSD: sshd.c,v 1.301 2004/08/11 11:50:09 dtucker Exp $"); +RCSID("$OpenBSD: sshd.c,v 1.302 2004/08/28 01:01:48 djm Exp $"); #include <openssl/dh.h> #include <openssl/bn.h> @@ -874,7 +874,7 @@ main(int ac, char **av) char ntop[NI_MAXHOST], strport[NI_MAXSERV]; char *line; int listen_sock, maxfd; - int startup_p[2], config_s[2]; + int startup_p[2] = { -1 , -1 }, config_s[2] = { -1 , -1 }; int startups = 0; Key *key; Authctxt *authctxt; @@ -1444,7 +1444,8 @@ main(int ac, char **av) sock_in = newsock; sock_out = newsock; log_init(__progname, options.log_level, options.log_facility, log_stderr); - close(config_s[0]); + if (rexec_flag) + close(config_s[0]); break; } } |