summaryrefslogtreecommitdiff
path: root/source3/nmbd/nmbd.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2001-12-20 22:27:05 +0000
committerJeremy Allison <jra@samba.org>2001-12-20 22:27:05 +0000
commit9ed10f83d76eba1c4d4ac19842314f24db1c7a65 (patch)
tree5d3a6e68e9a597e160e74d03f34799850dd43a08 /source3/nmbd/nmbd.c
parent0c26ae18809f82146ff584c3ba875c82d0b4824f (diff)
downloadsamba-9ed10f83d76eba1c4d4ac19842314f24db1c7a65.tar.gz
samba-9ed10f83d76eba1c4d4ac19842314f24db1c7a65.tar.bz2
samba-9ed10f83d76eba1c4d4ac19842314f24db1c7a65.zip
Removed global debugf. Replaced with lp_set_logfile(name).
Fixed winbindd to finally stop leaving log. file droppings :-). Jeremy. (This used to be commit 0bea6cf79a44f79fa3a4f2c8381e898e79c66509)
Diffstat (limited to 'source3/nmbd/nmbd.c')
-rw-r--r--source3/nmbd/nmbd.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/source3/nmbd/nmbd.c b/source3/nmbd/nmbd.c
index 963e265330..80d712036d 100644
--- a/source3/nmbd/nmbd.c
+++ b/source3/nmbd/nmbd.c
@@ -26,8 +26,6 @@
#include "includes.h"
-extern pstring debugf;
-
int ClientNMB = -1;
int ClientDGRAM = -1;
int global_nmb_port = -1;
@@ -103,7 +101,7 @@ static BOOL dump_core(void)
{
char *p;
pstring dname;
- pstrcpy( dname, debugf );
+ pstrcpy( dname, lp_logfile() );
if ((p=strrchr_m(dname,'/')))
*p=0;
pstrcat( dname, "/corefiles" );
@@ -662,6 +660,7 @@ static void usage(char *pname)
extern char *optarg;
extern BOOL append_log;
BOOL opt_interactive = False;
+ pstring logfile;
append_log = True; /* Default, override with '-o' option. */
@@ -672,7 +671,8 @@ static void usage(char *pname)
sys_srandom(time(NULL) ^ sys_getpid());
- slprintf(debugf, sizeof(debugf)-1, "%s/log.nmbd", dyn_LOGFILEBASE);
+ slprintf(logfile, sizeof(logfile)-1, "%s/log.nmbd", dyn_LOGFILEBASE);
+ lp_set_logfile(logfile);
/* this is for people who can't start the program correctly */
while (argc > 1 && (*argv[1] != '-'))
@@ -728,7 +728,8 @@ static void usage(char *pname)
strupper(global_myname);
break;
case 'l':
- slprintf(debugf, sizeof(debugf)-1, "%s/log.nmbd", optarg);
+ slprintf(logfile, sizeof(logfile)-1, "%s/log.nmbd", optarg);
+ lp_set_logfile(logfile);
break;
case 'a':
append_log = True;