smbd: use sconn->root_ev_ctx for smbd_sig_{term,hup}_handler()
authorStefan Metzmacher <metze@samba.org>
Thu, 22 Mar 2018 09:54:41 +0000 (10:54 +0100)
committerStefan Metzmacher <metze@samba.org>
Mon, 18 Jun 2018 06:59:21 +0000 (08:59 +0200)
They already call change_to_root_user(), which can be removed
later.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
source3/smbd/process.c

index 2363eb78ea52c4a424c9971daca32e0bb9e96b9e..d2553049cd2568e24e78e39f43c374d95a0825e6 100644 (file)
@@ -977,7 +977,7 @@ static void smbd_setup_sig_term_handler(struct smbd_server_connection *sconn)
 {
        struct tevent_signal *se;
 
-       se = tevent_add_signal(sconn->ev_ctx,
+       se = tevent_add_signal(sconn->root_ev_ctx,
                               sconn,
                               SIGTERM, 0,
                               smbd_sig_term_handler,
@@ -1007,7 +1007,7 @@ static void smbd_setup_sig_hup_handler(struct smbd_server_connection *sconn)
 {
        struct tevent_signal *se;
 
-       se = tevent_add_signal(sconn->ev_ctx,
+       se = tevent_add_signal(sconn->root_ev_ctx,
                               sconn,
                               SIGHUP, 0,
                               smbd_sig_hup_handler,