]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
Mask general purpose signals for notifyd.
authorHemanth Thummala <hemanth.thummala@nutanix.com>
Thu, 14 Apr 2016 20:09:37 +0000 (13:09 -0700)
committerStefan Metzmacher <metze@samba.org>
Fri, 29 Apr 2016 07:34:29 +0000 (09:34 +0200)
Currently there is no signal handling available for notify daemon.
Signals like SIGHUP and SIGUSR1 can lead to terminate the notify
daemon. Masking these signals for notifyd as we are not handling them.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=11840

Signed-off-by: Hemanth Thummala <hemanth.thummala@nutanix.com>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Fri Apr 15 15:31:19 CEST 2016 on sn-devel-144

(cherry picked from commit cade673f5fff8a578b8620149688ecc93e981205)

source3/smbd/notifyd/notifyd.c

index 3a9bc752c76356025f5e54d62b4e09d379a10af5..13048457e000943c876308560d4668650c17e467 100644 (file)
@@ -246,6 +246,10 @@ struct tevent_req *notifyd_send(TALLOC_CTX *mem_ctx, struct tevent_context *ev,
                return tevent_req_post(req, ev);
        }
 
+       /* Block those signals that we are not handling */
+       BlockSignals(True, SIGHUP);
+       BlockSignals(True, SIGUSR1);
+
        if (ctdbd_conn == NULL) {
                /*
                 * No cluster around, skip the database replication