Bugzilla – Attachment 2347 Details for
Bug 2139
re-exec fallback problem
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Revised diff
startuppipe2.diff (text/plain), 1.48 KB, created by
Damien Miller
on 2013-10-10 12:07:09 AEDT
(
hide
)
Description:
Revised diff
Filename:
MIME Type:
Creator:
Damien Miller
Created:
2013-10-10 12:07:09 AEDT
Size:
1.48 KB
patch
obsolete
>Index: sshd.c >=================================================================== >RCS file: /cvs/src/usr.bin/ssh/sshd.c,v >retrieving revision 1.406 >diff -u -p -U8 -r1.406 sshd.c >--- sshd.c 2 Sep 2013 22:00:34 -0000 1.406 >+++ sshd.c 10 Oct 2013 01:06:02 -0000 >@@ -1821,35 +1821,34 @@ main(int ac, char **av) > int fd; > > debug("rexec start in %d out %d newsock %d pipe %d sock %d", > sock_in, sock_out, newsock, startup_pipe, config_s[0]); > dup2(newsock, STDIN_FILENO); > dup2(STDIN_FILENO, STDOUT_FILENO); > if (startup_pipe == -1) > close(REEXEC_STARTUP_PIPE_FD); >- else >+ else if (startup_pipe != REEXEC_STARTUP_PIPE_FD) { > dup2(startup_pipe, REEXEC_STARTUP_PIPE_FD); >+ close(startup_pipe); >+ startup_pipe = REEXEC_STARTUP_PIPE_FD; >+ } > > dup2(config_s[1], REEXEC_CONFIG_PASS_FD); > close(config_s[1]); >- if (startup_pipe != -1) >- close(startup_pipe); > > execv(rexec_argv[0], rexec_argv); > > /* Reexec has failed, fall back and continue */ > error("rexec of %s failed: %s", rexec_argv[0], strerror(errno)); > recv_rexec_state(REEXEC_CONFIG_PASS_FD, NULL); > log_init(__progname, options.log_level, > options.log_facility, log_stderr); > > /* Clean up fds */ >- startup_pipe = REEXEC_STARTUP_PIPE_FD; >- close(config_s[1]); > close(REEXEC_CONFIG_PASS_FD); > newsock = sock_out = sock_in = dup(STDIN_FILENO); > if ((fd = open(_PATH_DEVNULL, O_RDWR, 0)) != -1) { > dup2(fd, STDIN_FILENO); > dup2(fd, STDOUT_FILENO); > if (fd > STDERR_FILENO) > close(fd); > }
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 2139
:
2339
| 2347