diff --git a/authfd.c b/authfd.c index 0d54e0a..6f898a0 100644 --- a/authfd.c +++ b/authfd.c @@ -105,7 +105,6 @@ ssh_get_authentication_socket(int *fdp) if ((sock = socket(AF_UNIX, SOCK_STREAM, 0)) < 0) return SSH_ERR_SYSTEM_ERROR; -#ifndef WIN32_FIXME /* close on exec */ if (fcntl(sock, F_SETFD, FD_CLOEXEC) == -1 || connect(sock, (struct sockaddr *)&sunaddr, sizeof(sunaddr)) < 0) { @@ -114,15 +113,6 @@ ssh_get_authentication_socket(int *fdp) errno = oerrno; return SSH_ERR_SYSTEM_ERROR; } -#else - if ( - connect(sock, (struct sockaddr *)&sunaddr, sizeof(sunaddr)) < 0) { - oerrno = errno; - close(sock); - errno = oerrno; - return SSH_ERR_SYSTEM_ERROR; - } -#endif /* #ifndef WIN32_FIXME */ if (fdp != NULL) *fdp = sock; diff --git a/channels.c b/channels.c index 98a4eec..6a8985f 100644 --- a/channels.c +++ b/channels.c @@ -253,14 +253,12 @@ channel_register_fds(Channel *c, int rfd, int wfd, int efd, channel_max_fd = MAX(channel_max_fd, wfd); channel_max_fd = MAX(channel_max_fd, efd); -#ifndef WIN32_FIXME if (rfd != -1) fcntl(rfd, F_SETFD, FD_CLOEXEC); if (wfd != -1 && wfd != rfd) fcntl(wfd, F_SETFD, FD_CLOEXEC); if (efd != -1 && efd != rfd && efd != wfd) fcntl(efd, F_SETFD, FD_CLOEXEC); -#endif c->rfd = rfd; c->wfd = wfd; diff --git a/serverloop.c b/serverloop.c index 738d60d..11b86d9 100644 --- a/serverloop.c +++ b/serverloop.c @@ -142,7 +142,6 @@ static int notify_pipe[2]; static void notify_setup(void) { -#ifndef WIN32_FIXME /* This was causing heap corruption */ if (pipe(notify_pipe) < 0) { error("pipe(notify_pipe) failed %s", strerror(errno)); } else if ((fcntl(notify_pipe[0], F_SETFD, FD_CLOEXEC) == -1) || @@ -155,9 +154,6 @@ notify_setup(void) set_nonblock(notify_pipe[1]); return; } -#endif - notify_pipe[0] = -1; /* read end */ - notify_pipe[1] = -1; /* write end */ } static void notify_parent(void) diff --git a/sshconnect.c b/sshconnect.c index a7d0ae5..2fe420e 100644 --- a/sshconnect.c +++ b/sshconnect.c @@ -414,9 +414,7 @@ ssh_create_socket(int privileged, struct addrinfo *ai) error("socket: %s", strerror(errno)); return -1; } -#ifndef WIN32_FIXME fcntl(sock, F_SETFD, FD_CLOEXEC); -#endif /* Bind the socket to an alternative local IP address */ if (options.bind_address == NULL && !privileged) diff --git a/sshd.c b/sshd.c index 312daae..17e6836 100644 --- a/sshd.c +++ b/sshd.c @@ -2900,11 +2900,9 @@ main(int ac, char **av) #endif /* !WIN32_FIXME */ } -#ifndef WIN32_FIXME /* Executed child processes don't need these. */ fcntl(sock_out, F_SETFD, FD_CLOEXEC); fcntl(sock_in, F_SETFD, FD_CLOEXEC); -#endif /* * Disable the key regeneration alarm. We will not regenerate the