upstream: disable stderr redirection before closing fds
OpenBSD-Commit-ID: d42cb895ee4542098050367fc35321c9303f003a
This commit is contained in:
parent
81c1099d22
commit
c0cb3b8c83
3
sshd.c
3
sshd.c
|
@ -1,4 +1,4 @@
|
|||
/* $OpenBSD: sshd.c,v 1.606 2024/06/06 17:15:25 djm Exp $ */
|
||||
/* $OpenBSD: sshd.c,v 1.607 2024/06/06 19:50:01 djm Exp $ */
|
||||
/*
|
||||
* Copyright (c) 2000, 2001, 2002 Markus Friedl. All rights reserved.
|
||||
* Copyright (c) 2002 Niels Provos. All rights reserved.
|
||||
|
@ -1793,6 +1793,7 @@ main(int ac, char **av)
|
|||
fatal("dup2 startup_p: %s", strerror(errno));
|
||||
close(startup_pipe);
|
||||
}
|
||||
log_redirect_stderr_to(NULL);
|
||||
closefrom(REEXEC_MIN_FREE_FD);
|
||||
|
||||
ssh_signal(SIGHUP, SIG_IGN); /* avoid reset to SIG_DFL */
|
||||
|
|
Loading…
Reference in New Issue