Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
char type;
int ret;
int port;
- struct stat st;
char *swrap_dir = NULL;
swrap_mutex_lock(&autobind_start_mutex);
type,
socket_wrapper_default_iface(),
port);
- if (stat(un_addr.sa.un.sun_path, &st) == 0) continue;
ret = libc_bind(fd, &un_addr.sa.s, un_addr.sa_socklen);
if (ret == -1) {
+ if (errno == EALREADY || errno == EADDRINUSE) {
+ continue;
+ }
goto done;
}