[openssh-commits] [openssh] 01/01: upstream: Fix ssh started with ControlPersist incorrectly executing a

git+noreply at mindrot.org git+noreply at mindrot.org
Fri May 14 13:11:06 AEST 2021


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

djm pushed a commit to branch master
in repository openssh.

commit 1e9fa55f4dc4b334651d569d3448aaa3841f736f
Author: djm at openbsd.org <djm at openbsd.org>
Date:   Fri May 14 03:09:48 2021 +0000

    upstream: Fix ssh started with ControlPersist incorrectly executing a
    
    shell when the -N (no shell) option was specified. bz3290 reported by Richard
    Schwab; patch from markus@ ok me
    
    OpenBSD-Commit-ID: ea1ea4af16a95687302f7690bdbe36a6aabf87e1
---
 ssh.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/ssh.c b/ssh.c
index 35b6b517..65a0ee2a 100644
--- a/ssh.c
+++ b/ssh.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ssh.c,v 1.553 2021/04/03 05:40:39 djm Exp $ */
+/* $OpenBSD: ssh.c,v 1.554 2021/05/14 03:09:48 djm Exp $ */
 /*
  * Author: Tatu Ylonen <ylo at cs.hut.fi>
  * Copyright (c) 1995 Tatu Ylonen <ylo at cs.hut.fi>, Espoo, Finland
@@ -2147,7 +2147,7 @@ ssh_session2(struct ssh *ssh, const struct ssh_conn_info *cinfo)
 		stdin_null_flag = 1;
 		no_shell_flag = 1;
 		tty_flag = 0;
-		if (!fork_after_authentication_flag)
+		if (!fork_after_authentication_flag && !no_shell_flag)
 			need_controlpersist_detach = 1;
 		fork_after_authentication_flag = 1;
 	}

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


More information about the openssh-commits mailing list