[SCM] Samba Shared Repository - branch v3-2-stable updated - release-3-2-0pre3-103-gca21a1e

Karolin Seeger kseeger at samba.org
Tue May 20 12:31:47 GMT 2008


The branch, v3-2-stable has been updated
       via  ca21a1e6eb297f65513139e201cbd212a0bd92d2 (commit)
      from  dfeeb74b00346aea16e69663fbc99f814e793229 (commit)

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-2-stable


- Log -----------------------------------------------------------------
commit ca21a1e6eb297f65513139e201cbd212a0bd92d2
Author: Jim McDonough <jmcd at samba.org>
Date:   Tue May 13 16:57:01 2008 -0400

    Enable winbind child processes to do something with signals,
    in particular closing and reopening logs on SIGHUP.
    
    Conflicts:
    
    	source/winbindd/winbindd.c
    (cherry picked from commit 36c51951c6bca7d9b56b02cd6469e9c5a1c5147f)

-----------------------------------------------------------------------

Summary of changes:
 source/winbindd/winbindd.c      |   35 +++++++++++++++++++++++------------
 source/winbindd/winbindd_dual.c |    4 ++++
 2 files changed, 27 insertions(+), 12 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/winbindd/winbindd.c b/source/winbindd/winbindd.c
index 1072f8e..57eee20 100644
--- a/source/winbindd/winbindd.c
+++ b/source/winbindd/winbindd.c
@@ -795,6 +795,27 @@ 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"));
+
+		flush_caches();
+		reload_services_file();
+
+		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
@@ -954,18 +975,8 @@ static void process_loop(void)
 
 	/* Check signal handling things */
 
-	if (do_sigterm)
-		terminate();
-
-	if (do_sighup) {
-
-		DEBUG(3, ("got SIGHUP\n"));
-
-		flush_caches();
-		reload_services_file();
-
-		do_sighup = False;
-	}
+	winbind_check_sigterm();
+	winbind_check_sighup();
 
 	if (do_sigusr2) {
 		print_winbindd_status();
diff --git a/source/winbindd/winbindd_dual.c b/source/winbindd/winbindd_dual.c
index 88121d2..d465801 100644
--- a/source/winbindd/winbindd_dual.c
+++ b/source/winbindd/winbindd_dual.c
@@ -1105,6 +1105,10 @@ static bool fork_domain_child(struct winbindd_child *child)
 		struct timeval now;
 		TALLOC_CTX *frame = talloc_stackframe();
 
+		/* check for signals */
+		winbind_check_sigterm();
+		winbind_check_sighup();
+
 		run_events(winbind_event_context(), 0, NULL, NULL);
 
 		GetTimeOfDay(&now);


-- 
Samba Shared Repository


More information about the samba-cvs mailing list