The branch, v3-0-test has been updated via 8998e18a2f3c7a0095614e58992a2facb34a3bc3 (commit) from 660be616b85a32725841877041190a6ec0f122f1 (commit)
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-0-test - Log ----------------------------------------------------------------- commit 8998e18a2f3c7a0095614e58992a2facb34a3bc3 Author: Jim McDonough <[EMAIL PROTECTED]> Date: Tue May 13 16:29:53 2008 -0400 Enable winbind child processes to do something with signals, in particular closing and reopening logs on SIGHUP. ----------------------------------------------------------------------- Summary of changes: source/nsswitch/winbindd.c | 31 +++++++++++++++++++++---------- source/nsswitch/winbindd_dual.c | 4 ++++ 2 files changed, 25 insertions(+), 10 deletions(-) Changeset truncated at 500 lines: diff --git a/source/nsswitch/winbindd.c b/source/nsswitch/winbindd.c index 18abdab..636d635 100644 --- a/source/nsswitch/winbindd.c +++ b/source/nsswitch/winbindd.c @@ -718,6 +718,25 @@ static BOOL remove_idle_client(void) return False; } +/* check if HUP has been received and reload files */ +void winbind_check_sighup(void) +{ + if (do_sighup) { + + DEBUG(3, ("got SIGHUP\n")); + + msg_reload_services(MSG_SMB_CONF_UPDATED, pid_to_procid(0), NULL, 0, NULL); + do_sighup = False; + } +} + +/* check if TERM has been received */ +void winbind_check_sigterm(void) +{ + if (do_sigterm) + terminate(); +} + /* Process incoming clients on listen_sock. We use a tricky non-blocking, non-forking, non-threaded model which allows us to handle many simultaneous connections while remaining impervious to many denial of @@ -882,16 +901,8 @@ static void process_loop(void) /* Check signal handling things */ - if (do_sigterm) - terminate(); - - if (do_sighup) { - - DEBUG(3, ("got SIGHUP\n")); - - msg_reload_services(MSG_SMB_CONF_UPDATED, pid_to_procid(0), NULL, 0, NULL); - do_sighup = False; - } + winbind_check_sigterm(); + winbind_check_sighup(); if (do_sigusr2) { print_winbindd_status(); diff --git a/source/nsswitch/winbindd_dual.c b/source/nsswitch/winbindd_dual.c index e058110..937924d 100644 --- a/source/nsswitch/winbindd_dual.c +++ b/source/nsswitch/winbindd_dual.c @@ -1014,6 +1014,10 @@ static BOOL fork_domain_child(struct winbindd_child *child) lp_TALLOC_FREE(); main_loop_TALLOC_FREE(); + /* check for signals */ + winbind_check_sigterm(); + winbind_check_sighup(); + run_events(winbind_event_context(), 0, NULL, NULL); GetTimeOfDay(&now); -- Samba Shared Repository