Version / Copyright messages never seen from smbd & nmbd - simple fix attached... maybe?

Richard Bollinger rabollinger at attbi.com
Mon Dec 31 06:58:03 GMT 2001


A very nice copyright / version message is supposed to output when nmbd and smbd start up... it
never appears because the debug level is still 0 at that point regardless of what log level we've
specified in smb.conf and the messages are coded with DEBUG(1,...).

Maybe there's a good reason why other folks would not, but we run with the following patch in order
to actually see the messages in our log files:

--- ../source/nmbd/nmbd.c Mon Dec 31 07:16:04 2001
+++ ./nmbd/nmbd.c Mon Dec 31 08:23:02 2001
@@ -775,8 +775,8 @@
   setup_logging( argv[0], opt_interactive );
   reopen_logs();

-  DEBUG( 1, ( "Netbios nameserver version %s started.\n", VERSION ) );
-  DEBUGADD( 1, ( "Copyright Andrew Tridgell 1994-2002\n" ) );
+  DEBUG( 0, ( "Netbios nameserver version %s started.\n", VERSION ) );
+  DEBUGADD( 0, ( "Copyright Andrew Tridgell 1994-2002\n" ) );

   if ( !reload_nmbd_services(False) )
     return(-1);
--- ../source/smbd/server.c Mon Dec 31 07:16:07 2001
+++ ./smbd/server.c Mon Dec 31 08:24:15 2001
@@ -693,8 +693,8 @@

  reopen_logs();

- DEBUG(1,( "smbd version %s started.\n", VERSION));
- DEBUGADD(1,( "Copyright Andrew Tridgell 1992-2002\n"));
+ DEBUG(0,( "smbd version %s started.\n", VERSION));
+ DEBUGADD(0,( "Copyright Andrew Tridgell 1992-2002\n"));

  DEBUG(2,("uid=%d gid=%d euid=%d egid=%d\n",
  (int)getuid(),(int)getgid(),(int)geteuid(),(int)getegid()));





More information about the samba-technical mailing list