diff options
author | 2010-07-12 22:38:52 +0000 | |
---|---|---|
committer | 2010-07-12 22:38:52 +0000 | |
commit | 88e678f216799117ad0a8a5b8a98c52aaffdc15a (patch) | |
tree | e8e25f2ae593f93a84190b47052ee4e4cd9418df /usr.bin/ssh/ssh.c | |
parent | Update to 1.4.14b. (diff) | |
download | wireguard-openbsd-88e678f216799117ad0a8a5b8a98c52aaffdc15a.tar.xz wireguard-openbsd-88e678f216799117ad0a8a5b8a98c52aaffdc15a.zip |
Make ExitOnForwardFailure work with fork-after-authentication ("ssh -f")
for protocol 2. ok markus@
Diffstat (limited to 'usr.bin/ssh/ssh.c')
-rw-r--r-- | usr.bin/ssh/ssh.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/usr.bin/ssh/ssh.c b/usr.bin/ssh/ssh.c index f2a714e50fd..e87fb8a0478 100644 --- a/usr.bin/ssh/ssh.c +++ b/usr.bin/ssh/ssh.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ssh.c,v 1.341 2010/06/26 23:04:04 djm Exp $ */ +/* $OpenBSD: ssh.c,v 1.342 2010/07/12 22:38:52 djm Exp $ */ /* * Author: Tatu Ylonen <ylo@cs.hut.fi> * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland @@ -1282,8 +1282,13 @@ ssh_session2(void) /* Start listening for multiplex clients */ muxserver_listen(); - /* If requested, let ssh continue in the background. */ - if (fork_after_authentication_flag) { + /* + * If requested and we are not interested in replies to remote + * forwarding requests, then let ssh continue in the background. + */ + if (fork_after_authentication_flag && + (!options.exit_on_forward_failure || + options.num_remote_forwards == 0)) { fork_after_authentication_flag = 0; if (daemon(1, 1) < 0) fatal("daemon() failed: %.200s", strerror(errno)); |