Both nmbd and winbind ignores --log-basename=... option and writes log files to directory which was hardcoded at a compile time. This is because they incorrectly assign log file name again (after command-line parsing). Here is a patch: diff -ur samba-3.0.6/source/nmbd/nmbd.c samba/source/nmbd/nmbd.c --- samba-3.0.6/source/nmbd/nmbd.c 2004-04-04 11:37:37.000000000 +0400 +++ samba/source/nmbd/nmbd.c 2004-09-19 23:25:28.000000000 +0400 @@ -29,6 +29,8 @@ extern BOOL global_in_nmbd; +extern BOOL override_logfile; + /* are we running as a daemon ? */ static BOOL is_daemon; @@ -623,8 +625,10 @@ sys_srandom(time(NULL) ^ sys_getpid()); - slprintf(logfile, sizeof(logfile)-1, "%s/log.nmbd", dyn_LOGFILEBASE); - lp_set_logfile(logfile); + if (!override_logfile) { + slprintf(logfile, sizeof(logfile)-1, "%s/log.nmbd", dyn_LOGFILEBASE); + lp_set_logfile(logfile); + } fault_setup((void (*)(void *))fault_continue ); diff -ur samba-3.0.6/source/nsswitch/winbindd.c samba/source/nsswitch/winbindd.c --- samba-3.0.6/source/nsswitch/winbindd.c 2004-08-07 01:38:19.000000000 +0400 +++ samba/source/nsswitch/winbindd.c 2004-09-19 23:30:40.000000000 +0400 @@ -28,6 +28,8 @@ BOOL opt_nocache = False; BOOL opt_dual_daemon = True; +extern BOOL override_logfile; + /* Reload configuration */ static BOOL reload_services_file(void) @@ -846,8 +848,10 @@ exit(1); } - pstr_sprintf(logfile, "%s/log.winbindd", dyn_LOGFILEBASE); - lp_set_logfile(logfile); + if (!override_logfile) { + pstr_sprintf(logfile, "%s/log.winbindd", dyn_LOGFILEBASE); + lp_set_logfile(logfile); + } setup_logging("winbindd", log_stdout); reopen_logs();
Patch applied. Thanks! Volker
sorry for the same, cleaning up the database to prevent unecessary reopens of bugs.