diff options
author | djm@openbsd.org <djm@openbsd.org> | 2021-07-13 23:48:36 +0000 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2021-07-14 09:49:47 +1000 |
commit | eda8909d1b0a85b9c3804a04d03ec6738fd9dc7f (patch) | |
tree | 67d608d9dfd6d927376414a40eaf1c9fac286a13 /clientloop.c | |
parent | 7ae69f2628e338ba6e0eae7ee8a63bcf8fea7538 (diff) | |
download | openssh-git-eda8909d1b0a85b9c3804a04d03ec6738fd9dc7f.tar.gz |
upstream: add a SessionType directive to ssh_config, allowing the
configuration file to offer equivalent control to the -N (no session) and -s
(subsystem) command-line flags.
Part of GHPR#231 by Volker Diels-Grabsch with some minor tweaks;
feedback and ok dtucker@
OpenBSD-Commit-ID: 726ee931dd4c5cc7f1d7a187b26f41257f9a2d12
Diffstat (limited to 'clientloop.c')
-rw-r--r-- | clientloop.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/clientloop.c b/clientloop.c index 2692fecc..fbca1a45 100644 --- a/clientloop.c +++ b/clientloop.c @@ -1,4 +1,4 @@ -/* $OpenBSD: clientloop.c,v 1.365 2021/07/05 01:21:07 dtucker Exp $ */ +/* $OpenBSD: clientloop.c,v 1.366 2021/07/13 23:48:36 djm Exp $ */ /* * Author: Tatu Ylonen <ylo@cs.hut.fi> * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland @@ -118,9 +118,6 @@ extern Options options; /* Flag indicating that stdin should be redirected from /dev/null. */ extern int stdin_null_flag; -/* Flag indicating that no shell has been requested */ -extern int no_shell_flag; - /* Flag indicating that ssh should daemonise after authentication is complete */ extern int fork_after_authentication_flag; @@ -1410,7 +1407,7 @@ client_loop(struct ssh *ssh, int have_pty, int escape_char_arg, * exit status to be returned. In that case, clear error code if the * connection was deliberately terminated at this end. */ - if (no_shell_flag && received_signal == SIGTERM) { + if (options.session_type == SESSION_TYPE_NONE && received_signal == SIGTERM) { received_signal = 0; exit_status = 0; } @@ -2585,7 +2582,7 @@ client_stop_mux(void) * If we are in persist mode, or don't have a shell, signal that we * should close when all active channels are closed. */ - if (options.control_persist || no_shell_flag) { + if (options.control_persist || options.session_type == SESSION_TYPE_NONE) { session_closed = 1; setproctitle("[stopped mux]"); } |