From: Ralph Boehme Date: Wed, 20 Jan 2021 11:27:23 +0000 (+0100) Subject: winbind: set logfile after reloading config X-Git-Tag: samba-4.12.12~32 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=32c2b3cf6106755099b9cec3eecc611a8bf8214e;p=thirdparty%2Fsamba.git winbind: set logfile after reloading config lp_load_global() will overwrite whatever we've set with lp_set_logfile(). BUG: https://bugzilla.samba.org/show_bug.cgi?id=14602 Signed-off-by: Ralph Boehme Reviewed-by: Jeremy Allison (cherry picked from commit 0c4497f8c66d0ea7c68d42c19e859932ebc3e2ac) --- diff --git a/source3/winbindd/winbindd.c b/source3/winbindd/winbindd.c index 85b1cc6e651..44790ea3429 100644 --- a/source3/winbindd/winbindd.c +++ b/source3/winbindd/winbindd.c @@ -114,15 +114,15 @@ bool winbindd_reload_services_file(const char *lfile) TALLOC_FREE(fname); } + reopen_logs(); + ret = lp_load_global(get_dyn_CONFIGFILE()); + /* if this is a child, restore the logfile to the special name - , idmap, etc. */ if (lfile && *lfile) { lp_set_logfile(lfile); } - reopen_logs(); - ret = lp_load_global(get_dyn_CONFIGFILE()); - reopen_logs(); load_interfaces(); winbindd_setup_max_fds();