The branch, v3-2-test has been updated
       via  147dc45cfb0da3677e381bec3873b9645b320f60 (commit)
      from  1006173f98ea8a19c4891c543373124dc2f65282 (commit)

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


- Log -----------------------------------------------------------------
commit 147dc45cfb0da3677e381bec3873b9645b320f60
Author: Jeremy Allison <[EMAIL PROTECTED]>
Date:   Thu Jul 17 20:01:13 2008 -0700

    From Jim McDonough
    
    In reloading the smb.conf, if a "log file" is specified in smb.conf,
    winbind children will overwrite the logfile name to be the same as the
    parent.
    
    Jeremy.

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

Summary of changes:
 source/winbindd/winbindd.c      |   18 ++++++++++++------
 source/winbindd/winbindd_dual.c |    3 ++-
 2 files changed, 14 insertions(+), 7 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/winbindd/winbindd.c b/source/winbindd/winbindd.c
index 1bc2ffd..98d70cc 100644
--- a/source/winbindd/winbindd.c
+++ b/source/winbindd/winbindd.c
@@ -56,7 +56,7 @@ struct messaging_context *winbind_messaging_context(void)
 
 /* Reload configuration */
 
-static bool reload_services_file(void)
+static bool reload_services_file(const char *logfile)
 {
        bool ret;
 
@@ -68,6 +68,12 @@ static bool reload_services_file(void)
                }
        }
 
+       /* if this is a child, restore the logfile to the special
+          name - <domain>, idmap, etc. */
+       if (logfile && *logfile) {
+               lp_set_logfile(logfile);
+       }
+
        reopen_logs();
        ret = lp_load(get_dyn_CONFIGFILE(),False,False,True,True);
 
@@ -205,7 +211,7 @@ static void msg_reload_services(struct messaging_context 
*msg,
 {
         /* Flush various caches */
        flush_caches();
-       reload_services_file();
+       reload_services_file((const char *) private_data);
 }
 
 /* React on 'smbcontrol winbindd shutdown' in the same way as on SIGTERM*/
@@ -801,14 +807,14 @@ static bool remove_idle_client(void)
 }
 
 /* check if HUP has been received and reload files */
-void winbind_check_sighup(void)
+void winbind_check_sighup(const char *logfile)
 {
        if (do_sighup) {
 
                DEBUG(3, ("got SIGHUP\n"));
 
                flush_caches();
-               reload_services_file();
+               reload_services_file(logfile);
 
                do_sighup = False;
        }
@@ -981,7 +987,7 @@ static void process_loop(void)
        /* Check signal handling things */
 
        winbind_check_sigterm(true);
-       winbind_check_sighup();
+       winbind_check_sighup(NULL);
 
        if (do_sigusr2) {
                print_winbindd_status();
@@ -1134,7 +1140,7 @@ int main(int argc, char **argv, char **envp)
 
        db_tdb2_setup_messaging(winbind_messaging_context(), true);
 
-       if (!reload_services_file()) {
+       if (!reload_services_file(NULL)) {
                DEBUG(0, ("error opening config file\n"));
                exit(1);
        }
diff --git a/source/winbindd/winbindd_dual.c b/source/winbindd/winbindd_dual.c
index c3bcb71..57ab627 100644
--- a/source/winbindd/winbindd_dual.c
+++ b/source/winbindd/winbindd_dual.c
@@ -1148,7 +1148,8 @@ static bool fork_domain_child(struct winbindd_child 
*child)
 
                /* check for signals */
                winbind_check_sigterm(false);
-               winbind_check_sighup();
+               winbind_check_sighup(override_logfile ? NULL :
+                               child->logfilename);
 
                run_events(winbind_event_context(), 0, NULL, NULL);
 


-- 
Samba Shared Repository

Reply via email to