mirror of git://anongit.mindrot.org/openssh.git
- dtucker@cvs.openbsd.org 2013/06/05 02:27:50
[sshd.c] When running sshd -D, close stderr unless we have explicitly requesting logging to stderr. From james.hunt at ubuntu.com via bz#1976, djm's patch so, err, ok dtucker.
This commit is contained in:
parent
746e9067bd
commit
0cca17fa18
|
@ -35,6 +35,11 @@
|
||||||
[mux.c]
|
[mux.c]
|
||||||
fix leaks in mux error paths, from Zhenbo Xu, found by Melton. bz#1967,
|
fix leaks in mux error paths, from Zhenbo Xu, found by Melton. bz#1967,
|
||||||
ok djm
|
ok djm
|
||||||
|
- dtucker@cvs.openbsd.org 2013/06/05 02:27:50
|
||||||
|
[sshd.c]
|
||||||
|
When running sshd -D, close stderr unless we have explicitly requesting
|
||||||
|
logging to stderr. From james.hunt at ubuntu.com via bz#1976, djm's patch
|
||||||
|
so, err, ok dtucker.
|
||||||
|
|
||||||
20130602
|
20130602
|
||||||
- (tim) [Makefile.in] Make Solaris, UnixWare, & OpenServer linkers happy
|
- (tim) [Makefile.in] Make Solaris, UnixWare, & OpenServer linkers happy
|
||||||
|
|
6
sshd.c
6
sshd.c
|
@ -1,4 +1,4 @@
|
||||||
/* $OpenBSD: sshd.c,v 1.402 2013/05/17 00:13:14 djm Exp $ */
|
/* $OpenBSD: sshd.c,v 1.403 2013/06/05 02:27:50 dtucker Exp $ */
|
||||||
/*
|
/*
|
||||||
* Author: Tatu Ylonen <ylo@cs.hut.fi>
|
* Author: Tatu Ylonen <ylo@cs.hut.fi>
|
||||||
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
|
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
|
||||||
|
@ -1024,7 +1024,9 @@ server_accept_inetd(int *sock_in, int *sock_out)
|
||||||
if ((fd = open(_PATH_DEVNULL, O_RDWR, 0)) != -1) {
|
if ((fd = open(_PATH_DEVNULL, O_RDWR, 0)) != -1) {
|
||||||
dup2(fd, STDIN_FILENO);
|
dup2(fd, STDIN_FILENO);
|
||||||
dup2(fd, STDOUT_FILENO);
|
dup2(fd, STDOUT_FILENO);
|
||||||
if (fd > STDOUT_FILENO)
|
if (!log_stderr)
|
||||||
|
dup2(fd, STDERR_FILENO);
|
||||||
|
if (fd > (log_stderr ? STDERR_FILENO : STDOUT_FILENO))
|
||||||
close(fd);
|
close(fd);
|
||||||
}
|
}
|
||||||
debug("inetd sockets after dupping: %d, %d", *sock_in, *sock_out);
|
debug("inetd sockets after dupping: %d, %d", *sock_in, *sock_out);
|
||||||
|
|
Loading…
Reference in New Issue