winbind: set logfile after reloading config
authorRalph Boehme <slow@samba.org>
Wed, 20 Jan 2021 11:27:23 +0000 (12:27 +0100)
committerKarolin Seeger <kseeger@samba.org>
Mon, 1 Feb 2021 07:50:10 +0000 (07:50 +0000)
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 <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
(cherry picked from commit 0c4497f8c66d0ea7c68d42c19e859932ebc3e2ac)

source3/winbindd/winbindd.c

index db660cb514787a2305bd83d3f2825d6c0172ec4d..bc5aec923857a910e9b9b5e211ebb2982ad3a208 100644 (file)
@@ -117,15 +117,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 - <domain>, 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();