From: Jelmer Vernooij Date: Sat, 24 Mar 2012 13:57:33 +0000 (+0100) Subject: sock_exec: Avoid sys_connect. X-Git-Tag: tdb-1.2.10~57 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=e7cd5291db8df13ca60c081727c7d804308c8737;p=thirdparty%2Fsamba.git sock_exec: Avoid sys_connect. --- diff --git a/source3/lib/sock_exec.c b/source3/lib/sock_exec.c index 2333d7c7396..419d60d05c3 100644 --- a/source3/lib/sock_exec.c +++ b/source3/lib/sock_exec.c @@ -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; }