diff options
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | sshd.c | 6 |
2 files changed, 9 insertions, 2 deletions
@@ -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 | ||
39 | 20130602 | 44 | 20130602 |
40 | - (tim) [Makefile.in] Make Solaris, UnixWare, & OpenServer linkers happy | 45 | - (tim) [Makefile.in] Make Solaris, UnixWare, & OpenServer linkers happy |
@@ -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); |