[SCM] Samba Shared Repository - branch v3-0-test updated -
release-3-0-29-92-g4a8ba39
Jeremy Allison
jra at samba.org
Fri Jul 18 03:10:48 GMT 2008
The branch, v3-0-test has been updated
via 4a8ba39d0dc7f487090a112e5a60294e28a3962c (commit)
from 2734fb1c50d5bb0d87c8793fc676a45315d0efca (commit)
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-0-test
- Log -----------------------------------------------------------------
commit 4a8ba39d0dc7f487090a112e5a60294e28a3962c
Author: Jim McDonough <jmcd at samba.org>
Date: Thu Jul 17 15:54:13 2008 -0400
In the "log file = " case, don't overwrite the
log.wb-<domain> logfile name on smb.conf reload.
-----------------------------------------------------------------------
Summary of changes:
source/nsswitch/winbindd.c | 17 +++++++++++------
source/nsswitch/winbindd_dual.c | 3 ++-
2 files changed, 13 insertions(+), 7 deletions(-)
Changeset truncated at 500 lines:
diff --git a/source/nsswitch/winbindd.c b/source/nsswitch/winbindd.c
index c79bb46..9cf4bea 100644
--- a/source/nsswitch/winbindd.c
+++ b/source/nsswitch/winbindd.c
@@ -46,7 +46,7 @@ struct event_context *winbind_event_context(void)
/* Reload configuration */
-static BOOL reload_services_file(void)
+static BOOL reload_services_file(const char *logfile)
{
BOOL ret;
@@ -62,6 +62,11 @@ static BOOL reload_services_file(void)
reopen_logs();
ret = lp_load(dyn_CONFIGFILE,False,False,True,True);
+ /* if this is a child, restore the logfile to the special
+ name - <domain>, idmap, etc. */
+ if (logfile && *logfile)
+ lp_set_logfile(logfile);
+
reopen_logs();
load_interfaces();
@@ -188,7 +193,7 @@ static void msg_reload_services(int msg_type, struct process_id src,
{
/* 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*/
@@ -726,13 +731,13 @@ 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"));
- msg_reload_services(MSG_SMB_CONF_UPDATED, pid_to_procid(0), NULL, 0, NULL);
+ msg_reload_services(MSG_SMB_CONF_UPDATED, pid_to_procid(0), NULL, 0, logfile);
do_sighup = False;
}
}
@@ -909,7 +914,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();
@@ -1007,7 +1012,7 @@ int main(int argc, char **argv, char **envp)
SAMBA_VERSION_STRING,
COPYRIGHT_STARTUP_MESSAGE) );
- if (!reload_services_file()) {
+ if (!reload_services_file(NULL)) {
DEBUG(0, ("error opening config file\n"));
exit(1);
}
diff --git a/source/nsswitch/winbindd_dual.c b/source/nsswitch/winbindd_dual.c
index 5ba68d6..40ebf54 100644
--- a/source/nsswitch/winbindd_dual.c
+++ b/source/nsswitch/winbindd_dual.c
@@ -1024,7 +1024,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
More information about the samba-cvs
mailing list