]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
smbd/notifyd: use smbd_reinit_after_fork()
authorRalph Boehme <slow@samba.org>
Tue, 5 Jul 2016 13:37:53 +0000 (15:37 +0200)
committerKarolin Seeger <kseeger@samba.org>
Wed, 3 Aug 2016 09:19:14 +0000 (11:19 +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>
(backported from commit bb90a8484a734b76ddd4d270f31fcdb4ae6cc48d)

source3/smbd/server.c

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