diff options
author | Simo Sorce <idra@samba.org> | 2011-08-18 10:35:19 -0400 |
---|---|---|
committer | Simo Sorce <idra@samba.org> | 2011-08-21 09:05:06 -0400 |
commit | 2c459546221863c960ef49c0ab8f406bad792351 (patch) | |
tree | e9769d748761f3bc65f4204333315972f0b45567 /source3/rpc_server | |
parent | 7bb4b991a54c85e7ca9fcfd15f85a38940ce6dfe (diff) | |
download | samba-2c459546221863c960ef49c0ab8f406bad792351.tar.gz samba-2c459546221863c960ef49c0ab8f406bad792351.tar.bz2 samba-2c459546221863c960ef49c0ab8f406bad792351.zip |
s3-lsasd: Remove useless check
If we *really* are a bout to exit (PF_WORKER_EXITING) then the event will not
be called as the loop will exit. Otherwise PF_SRV_MSG_EXIT may not be honoured
for a long time if we have cients connected, therefore keep handling SIGHUP
properly in those cases.
Signed-off-by: Andreas Schneider <asn@samba.org>
Signed-off-by: Simo Sorce <idra@samba.org>
Diffstat (limited to 'source3/rpc_server')
-rw-r--r-- | source3/rpc_server/lsasd.c | 19 |
1 files changed, 3 insertions, 16 deletions
diff --git a/source3/rpc_server/lsasd.c b/source3/rpc_server/lsasd.c index 23e11e0b1d..9855641036 100644 --- a/source3/rpc_server/lsasd.c +++ b/source3/rpc_server/lsasd.c @@ -192,11 +192,6 @@ static void lsasd_setup_sig_hup_handler(struct tevent_context *ev_ctx) * Children **********************************************************/ -struct lsasd_chld_sig_hup_ctx { - struct messaging_context *msg_ctx; - struct pf_worker_data *pf; -}; - static void lsasd_chld_sig_hup_handler(struct tevent_context *ev, struct tevent_signal *se, int signum, @@ -204,19 +199,11 @@ static void lsasd_chld_sig_hup_handler(struct tevent_context *ev, void *siginfo, void *pvt) { - struct pf_worker_data *pf = (struct pf_worker_data *)pvt; - - /* avoid wasting CPU cycles if we are going to exit soon anyways */ - if (pf->cmds == PF_SRV_MSG_EXIT) { - return; - } - change_to_root_user(); lsasd_reopen_logs(lsasd_child_id); } -static bool lsasd_setup_chld_hup_handler(struct tevent_context *ev_ctx, - struct pf_worker_data *pf) +static bool lsasd_setup_chld_hup_handler(struct tevent_context *ev_ctx) { struct tevent_signal *se; @@ -224,7 +211,7 @@ static bool lsasd_setup_chld_hup_handler(struct tevent_context *ev_ctx, ev_ctx, SIGHUP, 0, lsasd_chld_sig_hup_handler, - pf); + NULL); if (!se) { DEBUG(1, ("failed to setup SIGHUP handler")); return false; @@ -267,7 +254,7 @@ static bool lsasd_child_init(struct tevent_context *ev_ctx, lsasd_child_id = child_id; lsasd_reopen_logs(child_id); - ok = lsasd_setup_chld_hup_handler(ev_ctx, pf); + ok = lsasd_setup_chld_hup_handler(ev_ctx); if (!ok) { return false; } |