sock_exec: Avoid sys_connect.
authorJelmer Vernooij <jelmer@samba.org>
Sat, 24 Mar 2012 13:57:33 +0000 (14:57 +0100)
committerJelmer Vernooij <jelmer@samba.org>
Sat, 24 Mar 2012 13:57:33 +0000 (14:57 +0100)
source3/lib/sock_exec.c

index 2333d7c73968ed7014ccb73def0511eef67cf442..419d60d05c3f57b4db90880352f3bf35397b4be7 100644 (file)
@@ -60,7 +60,7 @@ static int socketpair_tcp(int fd[2])
 
        sock.sin_addr.s_addr = htonl(INADDR_LOOPBACK);
 
-       if (sys_connect(fd[1], (struct sockaddr *)&sock) == -1) {
+       if (connect(fd[1], (struct sockaddr *)&sock, socklen) == -1) {
                if (errno != EINPROGRESS) goto failed;
        } else {
                connect_done = 1;
@@ -70,7 +70,7 @@ static int socketpair_tcp(int fd[2])
 
        close(listener);
        if (connect_done == 0) {
-               if (sys_connect(fd[1], (struct sockaddr *)&sock) != 0
+               if (connect(fd[1], (struct sockaddr *)&sock, salen) != 0
                    && errno != EISCONN) goto failed;
        }