]> andersk Git - openssh.git/blobdiff - sshconnect.c
- djm@cvs.openbsd.org 2010/01/30 02:54:53
[openssh.git] / sshconnect.c
index a09026e65071e285ed2bd4193fda56f2b5120325..63c4650f738b9957903d5fdecfff5385f48337df 100644 (file)
@@ -1,4 +1,4 @@
-/* $OpenBSD: sshconnect.c,v 1.215 2009/10/28 16:38:18 reyk Exp $ */
+/* $OpenBSD: sshconnect.c,v 1.218 2010/01/13 00:19:04 dtucker Exp $ */
 /*
  * Author: Tatu Ylonen <ylo@cs.hut.fi>
  * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -28,6 +28,7 @@
 
 #include <ctype.h>
 #include <errno.h>
+#include <fcntl.h>
 #include <netdb.h>
 #ifdef HAVE_PATHS_H
 #include <paths.h>
@@ -190,10 +191,12 @@ ssh_create_socket(int privileged, struct addrinfo *ai)
                        debug("Allocated local port %d.", p);
                return sock;
        }
-       sock = socket_rdomain(ai->ai_family, ai->ai_socktype, ai->ai_protocol,
-           options.rdomain);
-       if (sock < 0)
+       sock = socket(ai->ai_family, ai->ai_socktype, ai->ai_protocol);
+       if (sock < 0) {
                error("socket: %.100s", strerror(errno));
+               return -1;
+       }
+       fcntl(sock, F_SETFD, FD_CLOEXEC);
 
        /* Bind the socket to an alternative local IP address */
        if (options.bind_address == NULL)
@@ -926,7 +929,7 @@ check_host_key(char *hostname, struct sockaddr *hostaddr, u_short port,
                 * XXX Should permit the user to change to use the new id.
                 * This could be done by converting the host key to an
                 * identifying sentence, tell that the host identifies itself
-                * by that sentence, and ask the user if he/she whishes to
+                * by that sentence, and ask the user if he/she wishes to
                 * accept the authentication.
                 */
                break;
This page took 0.110184 seconds and 4 git commands to generate.