summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Schneider <asn@samba.org>2014-06-05 23:47:40 +0200
committerAndreas Schneider <asn@samba.org>2014-06-05 23:47:40 +0200
commit86114df0dfc8d74fc545d08c864f9045c70fe452 (patch)
treea9a8a0a494b63538b0a0d2abb72fd82f23bfbfc4
parentd768235f48622c89378cb32c48a65ecb97dd2780 (diff)
downloadsocket_wrapper-86114df0dfc8d74fc545d08c864f9045c70fe452.tar.gz
socket_wrapper-86114df0dfc8d74fc545d08c864f9045c70fe452.tar.xz
socket_wrapper-86114df0dfc8d74fc545d08c864f9045c70fe452.zip
swrap: Disable incomplete bind checks for EADDRINUSE.
Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
-rw-r--r--src/socket_wrapper.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/socket_wrapper.c b/src/socket_wrapper.c
index f6adc95..afd9343 100644
--- a/src/socket_wrapper.c
+++ b/src/socket_wrapper.c
@@ -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;