From 50f2d4760d48cec1eff1c649d7f759fa6971f27b Mon Sep 17 00:00:00 2001 From: djm Date: Thu, 6 Jun 2024 19:50:01 +0000 Subject: [PATCH] disable stderr redirection before closing fds --- usr.bin/ssh/sshd.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/usr.bin/ssh/sshd.c b/usr.bin/ssh/sshd.c index 33e35284767..adc71cefe6a 100644 --- a/usr.bin/ssh/sshd.c +++ b/usr.bin/ssh/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. @@ -1697,6 +1697,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 */ -- 2.20.1