swrap: Disable incomplete bind checks for EADDRINUSE.
authorAndreas Schneider <asn@samba.org>
Thu, 5 Jun 2014 21:47:40 +0000 (23:47 +0200)
committerAndreas Schneider <asn@samba.org>
Thu, 5 Jun 2014 21:47:40 +0000 (23:47 +0200)
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
src/socket_wrapper.c

index f6adc95c152c978a08039214bb58f8c43f80e34b..afd93433aea7ede9106a06ee05962e87cbf000e8 100644 (file)
@@ -1267,6 +1267,7 @@ static struct socket_info *find_socket_info(int fd)
        return NULL;
 }
 
+#if 0 /* FIXME */
 static bool check_addr_port_in_use(const struct sockaddr *sa, socklen_t len)
 {
        struct socket_info *s;
@@ -1348,7 +1349,7 @@ static bool check_addr_port_in_use(const struct sockaddr *sa, socklen_t len)
 
        return false;
 }
-
+#endif
 
 static void swrap_remove_stale(int fd)
 {
@@ -2829,7 +2830,9 @@ static int swrap_bind(int s, const struct sockaddr *myaddr, socklen_t addrlen)
        struct sockaddr_un un_addr;
        struct socket_info *si = find_socket_info(s);
        int bind_error = 0;
+#if 0 /* FIXME */
        bool in_use;
+#endif
 
        if (!si) {
                return libc_bind(s, myaddr, addrlen);
@@ -2885,11 +2888,13 @@ static int swrap_bind(int s, const struct sockaddr *myaddr, socklen_t addrlen)
                return -1;
        }
 
+#if 0 /* FIXME */
        in_use = check_addr_port_in_use(myaddr, addrlen);
        if (in_use) {
                errno = EADDRINUSE;
                return -1;
        }
+#endif
 
        free(si->myname);
        si->myname_len = addrlen;