Bugzilla – Attachment 1319 Details for
Bug 1330
ControlPersist: fork and leave ControlMaster behind as a daemon
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
implement boolean ControlPersist option.
openssh-4.3p2-controlpersist.patch (text/plain), 2.16 KB, created by
David Woodhouse
on 2007-07-06 01:22:45 AEST
(
hide
)
Description:
implement boolean ControlPersist option.
Filename:
MIME Type:
Creator:
David Woodhouse
Created:
2007-07-06 01:22:45 AEST
Size:
2.16 KB
patch
obsolete
>--- openssh/clientloop.c~ 2005-06-17 03:59:35.000000000 +0100 >+++ openssh/clientloop.c 2005-06-23 11:05:11.000000000 +0100 >@@ -1271,8 +1271,28 @@ static void > client_channel_closed(int id, void *arg) > { > channel_cancel_cleanup(id); >- session_closed = 1; > leave_raw_mode(); >+ if (options.control_persist && options.control_path != NULL && control_fd != -1) { >+ int pid = fork(); >+ >+ if (pid < 0) { >+ error("fork: %.100s", strerror(errno)); >+ /* Just exit */ >+ session_closed = 1; >+ return; >+ } >+ if (pid != 0) { >+ /* We are the parent. Exit, leaving the child to continue serving */ >+ exit(exit_status); >+ } >+ session_ident = -1; >+ /* We _must_ lose our controlling tty, else subsequent control_client >+ invocations from the same tty will cause us to get -EIO when reading >+ from the tty */ >+ setsid(); >+ return; >+ } >+ session_closed = 1; > } > > /* >--- openssh/readconf.c~ 2005-06-16 04:19:42.000000000 +0100 >+++ openssh/readconf.c 2005-06-23 11:05:11.000000000 +0100 >@@ -106,7 +106,7 @@ typedef enum { > oEnableSSHKeysign, oRekeyLimit, oVerifyHostKeyDNS, oConnectTimeout, > oAddressFamily, oGssAuthentication, oGssDelegateCreds, > oServerAliveInterval, oServerAliveCountMax, oIdentitiesOnly, >- oSendEnv, oControlPath, oControlMaster, oHashKnownHosts, >+ oSendEnv, oControlPath, oControlMaster, oControlPersist, oHashKnownHosts, > oTunnel, oTunnelDevice, oLocalCommand, oPermitLocalCommand, > oDeprecated, oUnsupported > } OpCodes; >@@ -197,6 +197,7 @@ static struct { > { "sendenv", oSendEnv }, > { "controlpath", oControlPath }, > { "controlmaster", oControlMaster }, >+ { "controlpersist", oControlPersist }, > { "hashknownhosts", oHashKnownHosts }, > { NULL, oBadOption } > }; >@@ -818,6 +819,10 @@ parse_int: > *intptr = value; > break; > >+ case oControlPersist: >+ intptr = &options->control_persist; >+ goto parse_flag; >+ > case oHashKnownHosts: > intptr = &options->hash_known_hosts; > goto parse_flag; >--- openssh/readconf.h~ 2005-06-16 04:19:42.000000000 +0100 >+++ openssh/readconf.h 2005-06-23 11:02:01.000000000 +0100 >@@ -112,6 +112,7 @@ typedef struct { > > char *control_path; > int control_master; >+ int control_persist; > > int hash_known_hosts; > } Options;
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 1330
:
1319
|
1322
|
1331
|
1338
|
1605
|
1858
|
1897