]> 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>
Tue, 10 Jan 2017 16:40:58 +0000 (17:40 +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

source3/lib/messages.c

index 505eb66fd4c87c76fdf429f3f8fb3269f3cfb2aa..533e8694612d37d7c63235d4b6a229c43acebdef 100644 (file)
@@ -626,6 +626,17 @@ int messaging_send_iov_from(struct messaging_context *msg_ctx,
                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;
 }