]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
messaging: Fix dead but not cleaned-up-yet destination sockets
authorVolker Lendecke <vl@samba.org>
Tue, 10 Jan 2017 12:30:54 +0000 (12:30 +0000)
committerStefan Metzmacher <metze@samba.org>
Sat, 14 Jan 2017 12:55:25 +0000 (13:55 +0100)
Bug: https://bugzilla.samba.org/show_bug.cgi?id=12509

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Tue Jan 10 17:40:58 CET 2017 on sn-devel-144

(cherry picked from commit e84e44ce923e5dc7529bb813e10a2890528a4ab0)

Autobuild-User(v4-4-test): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(v4-4-test): Sat Jan 14 13:55:25 CET 2017 on sn-devel-144

source3/lib/messages.c

index ef8e83dd6e61fa6b13133dd6ffde4cec8d5e97e3..908c53cfd9609f247ed9451ce829d4ef619fe10d 100644 (file)
@@ -561,6 +561,17 @@ int messaging_send_iov_from(struct messaging_context *msg_ctx,
        ret = messaging_dgm_send(dst.pid, iov2, iovlen+1, fds, num_fds);
        unbecome_root();
 
+       if (ret == ECONNREFUSED) {
+               /*
+                * Linux returns this when a socket exists in the file
+                * system without a listening process. This is not
+                * documented in susv4 or the linux manpages, but it's
+                * easily testable. For the higher levels this is the
+                * same as "destination does not exist"
+                */
+               ret = ENOENT;
+       }
+
        return ret;
 }