From c0cb3b8c837761816a60a3cdb54062668df09652 Mon Sep 17 00:00:00 2001 From: "djm@openbsd.org" Date: Thu, 6 Jun 2024 19:50:01 +0000 Subject: upstream: disable stderr redirection before closing fds OpenBSD-Commit-ID: d42cb895ee4542098050367fc35321c9303f003a --- sshd.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sshd.c b/sshd.c index e9894d249..f8fb69422 100644 --- 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 */ -- cgit v1.2.3