]> git.ipfire.org Git - thirdparty/openssh-portable.git/commitdiff
upstream: disable stderr redirection before closing fds
authordjm@openbsd.org <djm@openbsd.org>
Thu, 6 Jun 2024 19:50:01 +0000 (19:50 +0000)
committerDamien Miller <djm@mindrot.org>
Thu, 6 Jun 2024 19:52:50 +0000 (05:52 +1000)
OpenBSD-Commit-ID: d42cb895ee4542098050367fc35321c9303f003a

sshd.c

diff --git a/sshd.c b/sshd.c
index e9894d2497031b1a6e611311daaf8793fab2e92a..f8fb6942298885bc4dad1c3ad238894d08825d66 100644 (file)
--- a/sshd.c
+++ b/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 */