Bug 923 - nmbd option "-l" or "--log-basename" broken
nmbd option "-l" or "--log-basename" broken
Status: RESOLVED DUPLICATE of bug 845
Product: Samba 3.0
Classification: Unclassified
Component: nmbd
3.0.1
All Linux
: P5 trivial
: none
Assigned To: Jelmer Vernooij
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2003-12-26 00:53 UTC by Andrew Kargalov
Modified: 2004-01-06 12:29 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Kargalov 2003-12-26 00:53:02 UTC
When I run nmbd with option -l /var/log/samba, log-file
nmbd.log was created in /usr/local/samba/var (default) 
directory.

This patch is trivial remedy:

diff -r -U3 samba-3.0.1/source/nmbd/nmbd.c samba-3.0.1-karl/source/nmbd/nmbd.c
--- samba-3.0.1/source/nmbd/nmbd.c      Fri Dec 26 17:18:18 2003
+++ samba-3.0.1-karl/source/nmbd/nmbd.c Fri Dec 26 16:53:44 2003
@@ -595,7 +595,7 @@
  **************************************************************************** */
  int main(int argc, const char *argv[])
 {
-       pstring logfile;
+//     pstring logfile;
        static BOOL opt_interactive;
        poptContext pc;
        int opt;
@@ -623,8 +623,8 @@

        sys_srandom(time(NULL) ^ sys_getpid());

-       slprintf(logfile, sizeof(logfile)-1, "%s/log.nmbd", dyn_LOGFILEBASE);
-       lp_set_logfile(logfile);
+//     slprintf(logfile, sizeof(logfile)-1, "%s/log.nmbd", dyn_LOGFILEBASE);
+//     lp_set_logfile(logfile);

        fault_setup((void (*)(void *))fault_continue );
Comment 1 Jelmer Vernooij 2004-01-06 12:29:27 UTC

*** This bug has been marked as a duplicate of 845 ***