diff options
author | Damien Miller <djm@cvs.openbsd.org> | 2021-05-14 03:09:49 +0000 |
---|---|---|
committer | Damien Miller <djm@cvs.openbsd.org> | 2021-05-14 03:09:49 +0000 |
commit | b26a6402a6d4a2754ce68bb4d40c2a1f2926ebb4 (patch) | |
tree | 686d0821996139504b296351e58b42c2c1a474b2 /usr.bin | |
parent | 7305d1e49f1b80fab86adfcab2a353d972b37068 (diff) |
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
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/ssh/ssh.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/ssh/ssh.c b/usr.bin/ssh/ssh.c index 6085f3d42b0..610d8c8b142 100644 --- a/usr.bin/ssh/ssh.c +++ b/usr.bin/ssh/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@cs.hut.fi> * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland @@ -2126,7 +2126,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; } |