summaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
authorDamien Miller <djm@cvs.openbsd.org>2011-12-02 00:41:57 +0000
committerDamien Miller <djm@cvs.openbsd.org>2011-12-02 00:41:57 +0000
commite0ddcfbf0ce14466da0c5e1f21729749ae43e669 (patch)
tree7cb03c4eae42b25544877cee29fec4d897200fd5 /usr.bin
parent38a1da02c72c96d51e0562a45cebb6d426c26e2e (diff)
fix bz#1948: ssh -f doesn't fork for multiplexed connection.
ok dtucker@
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/ssh/mux.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/usr.bin/ssh/mux.c b/usr.bin/ssh/mux.c
index 34addc1a266..09d4005fd20 100644
--- a/usr.bin/ssh/mux.c
+++ b/usr.bin/ssh/mux.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mux.c,v 1.31 2011/09/23 07:45:05 markus Exp $ */
+/* $OpenBSD: mux.c,v 1.32 2011/12/02 00:41:56 djm Exp $ */
/*
* Copyright (c) 2002-2008 Damien Miller <djm@openbsd.org>
*
@@ -78,6 +78,7 @@ extern Buffer command;
extern volatile sig_atomic_t quit_pending;
extern char *stdio_forward_host;
extern int stdio_forward_port;
+extern int fork_after_authentication_flag;
/* Context for session open confirmation callback */
struct mux_session_confirm_ctx {
@@ -1778,6 +1779,8 @@ mux_client_request_session(int fd)
if (tty_flag)
enter_raw_mode(options.request_tty == REQUEST_TTY_FORCE);
+ if (fork_after_authentication_flag)
+ daemon(1, 1);
/*
* Stick around until the controlee closes the client_fd.
* Before it does, it is expected to write an exit message.