[openssh-commits] [openssh] 02/02: upstream: close stdin when forking after authentication too; ok markus

git+noreply at mindrot.org git+noreply at mindrot.org
Mon Sep 21 17:30:37 AEST 2020


This is an automated email from the git hooks/post-receive script.

djm pushed a commit to branch master
in repository openssh.

commit 0a4a5571ada76b1b012bec9cf6ad1203fc19ec8d
Author: djm at openbsd.org <djm at openbsd.org>
Date:   Mon Sep 21 07:29:09 2020 +0000

    upstream: close stdin when forking after authentication too; ok markus
    
    OpenBSD-Commit-ID: 43db17e4abc3e6b4a7b033aa8cdab326a7cb6c24
---
 ssh.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/ssh.c b/ssh.c
index 6202e3c0..f34ca0d7 100644
--- a/ssh.c
+++ b/ssh.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ssh.c,v 1.535 2020/09/20 23:31:46 djm Exp $ */
+/* $OpenBSD: ssh.c,v 1.536 2020/09/21 07:29:09 djm Exp $ */
 /*
  * Author: Tatu Ylonen <ylo at cs.hut.fi>
  * Copyright (c) 1995 Tatu Ylonen <ylo at cs.hut.fi>, Espoo, Finland
@@ -1758,7 +1758,8 @@ fork_postauth(void)
 		    _PATH_DEVNULL, strerror(errno));
 	else {
 		keep_stderr = log_is_on_stderr() && debug_flag;
-		if (dup2(devnull, STDOUT_FILENO) == -1 ||
+		if (dup2(devnull, STDIN_FILENO) == -1 ||
+		    dup2(devnull, STDOUT_FILENO) == -1 ||
 		    (!keep_stderr && dup2(devnull, STDOUT_FILENO) == -1))
 			fatal("%s: dup2() stdio failed", __func__);
 		if (devnull > STDERR_FILENO)

-- 
To stop receiving notification emails like this one, please contact
djm at mindrot.org.


More information about the openssh-commits mailing list