View | Details | Raw Unified | Return to bug 2139 | Differences between
and this patch

Collapse All | Expand All

(-)sshd.c (-5 / +3 lines)
Lines 1826-1838 main(int ac, char **av) Link Here
1826
		dup2(STDIN_FILENO, STDOUT_FILENO);
1826
		dup2(STDIN_FILENO, STDOUT_FILENO);
1827
		if (startup_pipe == -1)
1827
		if (startup_pipe == -1)
1828
			close(REEXEC_STARTUP_PIPE_FD);
1828
			close(REEXEC_STARTUP_PIPE_FD);
1829
		else
1829
		else {
1830
			dup2(startup_pipe, REEXEC_STARTUP_PIPE_FD);
1830
			dup2(startup_pipe, REEXEC_STARTUP_PIPE_FD);
1831
			startup_pipe = REEXEC_STARTUP_PIPE_FD;
1832
		}
1831
1833
1832
		dup2(config_s[1], REEXEC_CONFIG_PASS_FD);
1834
		dup2(config_s[1], REEXEC_CONFIG_PASS_FD);
1833
		close(config_s[1]);
1835
		close(config_s[1]);
1834
		if (startup_pipe != -1)
1835
			close(startup_pipe);
1836
1836
1837
		execv(rexec_argv[0], rexec_argv);
1837
		execv(rexec_argv[0], rexec_argv);
1838
1838
Lines 1843-1850 main(int ac, char **av) Link Here
1843
		    options.log_facility, log_stderr);
1843
		    options.log_facility, log_stderr);
1844
1844
1845
		/* Clean up fds */
1845
		/* Clean up fds */
1846
		startup_pipe = REEXEC_STARTUP_PIPE_FD;
1847
		close(config_s[1]);
1848
		close(REEXEC_CONFIG_PASS_FD);
1846
		close(REEXEC_CONFIG_PASS_FD);
1849
		newsock = sock_out = sock_in = dup(STDIN_FILENO);
1847
		newsock = sock_out = sock_in = dup(STDIN_FILENO);
1850
		if ((fd = open(_PATH_DEVNULL, O_RDWR, 0)) != -1) {
1848
		if ((fd = open(_PATH_DEVNULL, O_RDWR, 0)) != -1) {

Return to bug 2139