smbd/notifyd: use smbd_reinit_after_fork()
authorRalph Boehme <slow@samba.org>
Tue, 5 Jul 2016 13:37:53 +0000 (15:37 +0200)
committerVolker Lendecke <vl@samba.org>
Sun, 10 Jul 2016 20:28:13 +0000 (22:28 +0200)
Using smbd_reinit_after_fork() rather then reinit_after_fork() ensures
am_parent is reset to NULL. Otherwise, when exiting for some reason, the
inherited atexit handler killkids() calls kill(0,SIGTERM) terminating
our whole process group including the main smbd.

Bug: https://bugzilla.samba.org/show_bug.cgi?id=12016

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
source3/smbd/server.c

index e68e0355b0f136c2a6b26851d4182d1de10010e8..6e70edcd8b1fe221dd44cf9e92e2c6fa260a1db8 100644 (file)
@@ -396,7 +396,7 @@ static bool smbd_notifyd_init(struct messaging_context *msg, bool interactive)
                return true;
        }
 
-       status = reinit_after_fork(msg, ev, true, "smbd-notifyd");
+       status = smbd_reinit_after_fork(msg, ev, true, "smbd-notifyd");
        if (!NT_STATUS_IS_OK(status)) {
                DEBUG(1, ("%s: reinit_after_fork failed: %s\n",
                          __func__, nt_errstr(status)));