diff options
author | Jeremy Allison <jra@samba.org> | 2008-07-17 20:10:18 -0700 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2008-07-17 20:10:18 -0700 |
commit | 1484b7f3b540a9a9ec77199cea034f6368f6d2ad (patch) | |
tree | aa9953b1f419f46f969fde56b203b48803934c3f /source3/winbindd/winbindd.c | |
parent | e9b8e887c1db8a86b15104db8043257c1fa3738b (diff) | |
download | samba-1484b7f3b540a9a9ec77199cea034f6368f6d2ad.tar.gz samba-1484b7f3b540a9a9ec77199cea034f6368f6d2ad.tar.bz2 samba-1484b7f3b540a9a9ec77199cea034f6368f6d2ad.zip |
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.
(This used to be commit 62d319cc1a2ef891866b2ddbd22f3ed0944356af)
Diffstat (limited to 'source3/winbindd/winbindd.c')
-rw-r--r-- | source3/winbindd/winbindd.c | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/source3/winbindd/winbindd.c b/source3/winbindd/winbindd.c index 4b7efe81eb..55ab58f7eb 100644 --- a/source3/winbindd/winbindd.c +++ b/source3/winbindd/winbindd.c @@ -59,7 +59,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; @@ -71,6 +71,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); @@ -208,7 +214,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*/ @@ -804,14 +810,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; } @@ -984,7 +990,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(); @@ -1136,7 +1142,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); } |