summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--sshd.c6
2 files changed, 9 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 70c094e1c..27f0cfcfa 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -35,6 +35,11 @@
35 [mux.c] 35 [mux.c]
36 fix leaks in mux error paths, from Zhenbo Xu, found by Melton. bz#1967, 36 fix leaks in mux error paths, from Zhenbo Xu, found by Melton. bz#1967,
37 ok djm 37 ok djm
38 - dtucker@cvs.openbsd.org 2013/06/05 02:27:50
39 [sshd.c]
40 When running sshd -D, close stderr unless we have explicitly requesting
41 logging to stderr. From james.hunt at ubuntu.com via bz#1976, djm's patch
42 so, err, ok dtucker.
38 43
3920130602 4420130602
40 - (tim) [Makefile.in] Make Solaris, UnixWare, & OpenServer linkers happy 45 - (tim) [Makefile.in] Make Solaris, UnixWare, & OpenServer linkers happy
diff --git a/sshd.c b/sshd.c
index c0ba420a3..1306a62a7 100644
--- a/sshd.c
+++ b/sshd.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: sshd.c,v 1.402 2013/05/17 00:13:14 djm Exp $ */ 1/* $OpenBSD: sshd.c,v 1.403 2013/06/05 02:27:50 dtucker 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
@@ -1024,7 +1024,9 @@ server_accept_inetd(int *sock_in, int *sock_out)
1024 if ((fd = open(_PATH_DEVNULL, O_RDWR, 0)) != -1) { 1024 if ((fd = open(_PATH_DEVNULL, O_RDWR, 0)) != -1) {
1025 dup2(fd, STDIN_FILENO); 1025 dup2(fd, STDIN_FILENO);
1026 dup2(fd, STDOUT_FILENO); 1026 dup2(fd, STDOUT_FILENO);
1027 if (fd > STDOUT_FILENO) 1027 if (!log_stderr)
1028 dup2(fd, STDERR_FILENO);
1029 if (fd > (log_stderr ? STDERR_FILENO : STDOUT_FILENO))
1028 close(fd); 1030 close(fd);
1029 } 1031 }
1030 debug("inetd sockets after dupping: %d, %d", *sock_in, *sock_out); 1032 debug("inetd sockets after dupping: %d, %d", *sock_in, *sock_out);