mirror of
https://github.com/PowerShell/openssh-portable.git
synced 2025-09-25 19:08:56 +02:00
fix inetd
This commit is contained in:
parent
18f1991754
commit
8e7aee937a
9
sshd.c
9
sshd.c
@ -1114,6 +1114,7 @@ server_accept_loop(int *sock_in, int *sock_out, int *newsock, int *config_s,
|
|||||||
* Got connection. Fork a child to handle it, unless
|
* Got connection. Fork a child to handle it, unless
|
||||||
* we are in debugging mode.
|
* we are in debugging mode.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (debug_flag) {
|
if (debug_flag) {
|
||||||
/*
|
/*
|
||||||
* In debugging mode. Close the listening
|
* In debugging mode. Close the listening
|
||||||
@ -1817,8 +1818,10 @@ main(int ac, char **av)
|
|||||||
/* Send configuration to ancestor sshd-session process */
|
/* Send configuration to ancestor sshd-session process */
|
||||||
if (socketpair(AF_UNIX, SOCK_STREAM, 0, config_s) == -1)
|
if (socketpair(AF_UNIX, SOCK_STREAM, 0, config_s) == -1)
|
||||||
fatal("socketpair: %s", strerror(errno));
|
fatal("socketpair: %s", strerror(errno));
|
||||||
|
#ifndef WINDOWS
|
||||||
send_rexec_state(config_s[0], cfg);
|
send_rexec_state(config_s[0], cfg);
|
||||||
close(config_s[0]);
|
close(config_s[0]);
|
||||||
|
#endif /* WINDOWS */
|
||||||
} else {
|
} else {
|
||||||
platform_pre_listen();
|
platform_pre_listen();
|
||||||
server_listen();
|
server_listen();
|
||||||
@ -1899,9 +1902,9 @@ main(int ac, char **av)
|
|||||||
posix_spawn_file_actions_t actions;
|
posix_spawn_file_actions_t actions;
|
||||||
posix_spawnattr_t attributes;
|
posix_spawnattr_t attributes;
|
||||||
if (posix_spawn_file_actions_init(&actions) != 0 ||
|
if (posix_spawn_file_actions_init(&actions) != 0 ||
|
||||||
posix_spawn_file_actions_adddup2(&actions, newsock, STDIN_FILENO) != 0 ||
|
(debug_flag && posix_spawn_file_actions_adddup2(&actions, newsock, STDIN_FILENO) != 0) ||
|
||||||
posix_spawn_file_actions_adddup2(&actions, newsock, STDOUT_FILENO) != 0 ||
|
(debug_flag && posix_spawn_file_actions_adddup2(&actions, newsock, STDOUT_FILENO) != 0) ||
|
||||||
posix_spawn_file_actions_adddup2(&actions, debug_startup_p, REEXEC_STARTUP_PIPE_FD) != 0 ||
|
(debug_flag && posix_spawn_file_actions_adddup2(&actions, debug_startup_p, REEXEC_STARTUP_PIPE_FD) != 0) ||
|
||||||
posix_spawn_file_actions_adddup2(&actions, config_s[1], REEXEC_CONFIG_PASS_FD) != 0 ||
|
posix_spawn_file_actions_adddup2(&actions, config_s[1], REEXEC_CONFIG_PASS_FD) != 0 ||
|
||||||
posix_spawnattr_init(&attributes) != 0 ||
|
posix_spawnattr_init(&attributes) != 0 ||
|
||||||
posix_spawnattr_setflags(&attributes, POSIX_SPAWN_SETPGROUP) != 0 ||
|
posix_spawnattr_setflags(&attributes, POSIX_SPAWN_SETPGROUP) != 0 ||
|
||||||
|
Loading…
x
Reference in New Issue
Block a user