winbindd: remove is_default_dyn_LOGFILEBASE() logic
authorRalph Boehme <slow@samba.org>
Wed, 10 Nov 2021 17:27:08 +0000 (18:27 +0100)
committerJule Anger <janger@samba.org>
Tue, 16 Nov 2021 16:01:17 +0000 (16:01 +0000)
Handling of -l commandline parameter is already implemented by lib/cmdline/.

is_default_dyn_LOGFILEBASE() == true is the default case and this causes us to
temporarily overwrite the configured logfile with LOGFILEBASE/log.winbindd until
winbindd_reload_services_file() restores it.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=14897

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
(cherry picked from commit 117d45df47a1f3206bc38aaeaa11f2b327e43530)

source3/winbindd/winbindd.c

index 290454619a4f207a8bbdb6e5790c604d7395a381..58c5ffbced47b5d8d7f6b3dca71f472f27c45254 100644 (file)
@@ -1717,15 +1717,6 @@ int main(int argc, const char **argv)
 
        poptFreeContext(pc);
 
-       if (is_default_dyn_LOGFILEBASE()) {
-               char *lfile = NULL;
-               if (asprintf(&lfile,"%s/log.winbindd",
-                               get_dyn_LOGFILEBASE()) > 0) {
-                       lp_set_logfile(lfile);
-                       SAFE_FREE(lfile);
-               }
-       }
-
        reopen_logs();
 
        DEBUG(0,("winbindd version %s started.\n", samba_version_string()));