diff options
author | Andreas Schneider <asn@samba.org> | 2014-06-05 23:38:59 +0200 |
---|---|---|
committer | Michael Adam <obnox@samba.org> | 2014-06-05 23:57:10 +0200 |
commit | 064592d9cb6349e625b881cfcfab37b19d141ebe (patch) | |
tree | a6cdd8fd480abe65ad94216370ee8300f3b22d5e /lib/socket_wrapper | |
parent | f6023bbd67f52907c79a2ab792b461582b0e482d (diff) | |
download | samba-064592d9cb6349e625b881cfcfab37b19d141ebe.tar.gz |
swrap: Disable incomplete bind checks (and tests) for EADDRINUSE.
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Diffstat (limited to 'lib/socket_wrapper')
-rw-r--r-- | lib/socket_wrapper/socket_wrapper.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/socket_wrapper/socket_wrapper.c b/lib/socket_wrapper/socket_wrapper.c index f6adc95c152..afd93433aea 100644 --- a/lib/socket_wrapper/socket_wrapper.c +++ b/lib/socket_wrapper/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; |