summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorAndreas Schneider <asn@samba.org>2015-02-23 17:18:16 +0100
committerAndreas Schneider <asn@cryptomilk.org>2015-02-23 20:02:51 +0100
commit6ba81a483cf6ab739358eac9e107f79697a9202a (patch)
treef6bf3607378bb8df78b4cfd52d87203b91c6a0b6 /lib
parentca9c6c8a323614de274678b42740b958a09736d1 (diff)
downloadsamba-6ba81a483cf6ab739358eac9e107f79697a9202a.tar.gz
swrap: If we remove the socket_info also unlink the unix socket
Signed-off-by: Andreas Schneider <asn@cryptomilk.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
Diffstat (limited to 'lib')
-rw-r--r--lib/socket_wrapper/socket_wrapper.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/socket_wrapper/socket_wrapper.c b/lib/socket_wrapper/socket_wrapper.c
index eb1d67fbeba..1188c4e5388 100644
--- a/lib/socket_wrapper/socket_wrapper.c
+++ b/lib/socket_wrapper/socket_wrapper.c
@@ -1418,6 +1418,9 @@ static void swrap_remove_stale(int fd)
if (si->fds == NULL) {
SWRAP_DLIST_REMOVE(sockets, si);
+ if (si->un_addr.sun_path[0] != '\0') {
+ unlink(si->un_addr.sun_path);
+ }
free(si);
}
}