Bugzilla – Attachment 2049 Details for
Bug 1902
persistent mux master should chdir away from the current directory
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
/home/djm/bz1902.diff
bz1902.diff (text/plain), 944 bytes, created by
Damien Miller
on 2011-05-20 12:25:29 AEST
(
hide
)
Description:
/home/djm/bz1902.diff
Filename:
MIME Type:
Creator:
Damien Miller
Created:
2011-05-20 12:25:29 AEST
Size:
944 bytes
patch
obsolete
>Index: ssh.c >=================================================================== >RCS file: /cvs/src/usr.bin/ssh/ssh.c,v >retrieving revision 1.360 >diff -u -p -r1.360 ssh.c >--- ssh.c 6 May 2011 21:38:58 -0000 1.360 >+++ ssh.c 20 May 2011 02:25:04 -0000 >@@ -54,6 +54,7 @@ > #include <ctype.h> > #include <errno.h> > #include <fcntl.h> >+#include <libgen.h> > #include <netdb.h> > #include <paths.h> > #include <pwd.h> >@@ -899,6 +900,7 @@ control_persist_detach(void) > { > pid_t pid; > int devnull; >+ char *newpwd; > > debug("%s: backgrounding master process", __func__); > >@@ -935,6 +937,14 @@ control_persist_detach(void) > if (devnull > STDERR_FILENO) > close(devnull); > } >+ /* >+ * Change directory to the one holding the mux socket to avoid >+ * blocking unmount by holding pwd open. >+ */ >+ if ((newpwd = dirname(options.control_path)) != NULL) >+ chdir(newpwd); >+ else >+ chdir("/"); > } > > /* Do fork() after authentication. Used by "ssh -f" */
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 1902
: 2049