Bugzilla – Attachment 1536 Details for
Bug 92
Feature: -f -f, like -f, but fork() after port/display/agent open
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
delay fork when ExitOnForwardFailure set
ssh-wait-rfwd.diff (text/plain), 2.04 KB, created by
Damien Miller
on 2008-06-29 18:57:03 AEST
(
hide
)
Description:
delay fork when ExitOnForwardFailure set
Filename:
MIME Type:
Creator:
Damien Miller
Created:
2008-06-29 18:57:03 AEST
Size:
2.04 KB
patch
obsolete
>? nohup.out >? sftp-complete-changes.diff >? sftp-complete-update.diff >? sftp-complete.diff >? sftp-complete2.diff >? sftp.c.origxxx >Index: ssh.c >=================================================================== >RCS file: /cvs/src/usr.bin/ssh/ssh.c,v >retrieving revision 1.317 >diff -u -p -r1.317 ssh.c >--- ssh.c 12 Jun 2008 16:35:31 -0000 1.317 >+++ ssh.c 29 Jun 2008 08:49:49 -0000 >@@ -841,9 +841,15 @@ ssh_confirm_remote_forward(int type, u_i > logit("Warning: remote port forwarding failed for " > "listen port %d", rfwd->listen_port); > } >- if (++remote_forward_confirms_received == options.num_remote_forwards) >+ if (++remote_forward_confirms_received == options.num_remote_forwards) { > debug("All remote forwarding requests processed"); >- /* XXX fork-after-authentication */ >+ if (fork_after_authentication_flag) { >+ fork_after_authentication_flag = 0; >+ if (daemon(1, 1) < 0) >+ fatal("daemon() failed: %.200s", >+ strerror(errno)); >+ } >+ } > } > > static void >@@ -1043,10 +1049,17 @@ ssh_session(void) > options.permit_local_command) > ssh_local_cmd(options.local_command); > >- /* 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)); >+ } > > /* > * If a command was specified on the command line, execute the >@@ -1185,9 +1198,11 @@ ssh_session2(void) > muxserver_listen(); > > /* If requested, let ssh continue in the background. */ >- if (fork_after_authentication_flag) >+ if (fork_after_authentication_flag) { >+ fork_after_authentication_flag = 0; > if (daemon(1, 1) < 0) > fatal("daemon() failed: %.200s", strerror(errno)); >+ } > > return client_loop(tty_flag, tty_flag ? > options.escape_char : SSH_ESCAPECHAR_NONE, id);
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 92
:
15
| 1536