From: Hemanth Thummala Date: Thu, 14 Apr 2016 20:09:37 +0000 (-0700) Subject: Mask general purpose signals for notifyd. X-Git-Tag: samba-4.3.9~33 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c7e26693ecbce777a51056bb9a80e863e952b2b8;p=thirdparty%2Fsamba.git Mask general purpose signals for notifyd. 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 Reviewed-by: Volker Lendecke Reviewed-by: Stefan Metzmacher Autobuild-User(master): Stefan Metzmacher Autobuild-Date(master): Fri Apr 15 15:31:19 CEST 2016 on sn-devel-144 (cherry picked from commit cade673f5fff8a578b8620149688ecc93e981205) --- diff --git a/source3/smbd/notifyd/notifyd.c b/source3/smbd/notifyd/notifyd.c index 3a9bc752c76..13048457e00 100644 --- a/source3/smbd/notifyd/notifyd.c +++ b/source3/smbd/notifyd/notifyd.c @@ -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