From 9ed10f83d76eba1c4d4ac19842314f24db1c7a65 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Thu, 20 Dec 2001 22:27:05 +0000 Subject: 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) --- source3/smbd/server.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'source3/smbd') diff --git a/source3/smbd/server.c b/source3/smbd/server.c index df56dfe9ab..c6eed4b9bb 100644 --- a/source3/smbd/server.c +++ b/source3/smbd/server.c @@ -21,7 +21,6 @@ #include "includes.h" -extern pstring debugf; extern fstring global_myworkgroup; extern pstring global_myname; @@ -425,7 +424,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"); mkdir(dname,0700); @@ -583,12 +582,13 @@ static void usage(char *pname) int main(int argc,char *argv[]) { extern BOOL append_log; + extern char *optarg; /* shall I run as a daemon */ BOOL is_daemon = False; BOOL specified_logfile = False; int port = SMB_PORT; int opt; - extern char *optarg; + pstring logfile; #ifdef HAVE_SET_AUTH_PARAMETERS set_auth_parameters(argc,argv); @@ -612,7 +612,8 @@ static void usage(char *pname) case 'l': specified_logfile = True; - slprintf(debugf, sizeof(debugf)-1, "%s/log.smbd", optarg); + slprintf(logfile, sizeof(logfile)-1, "%s/log.smbd", optarg); + lp_set_logfile(logfile); break; case 'a': @@ -670,8 +671,9 @@ static void usage(char *pname) append_log = True; if(!specified_logfile) { - slprintf(debugf, sizeof(debugf)-1, "%s/log.smbd", + slprintf(logfile, sizeof(logfile)-1, "%s/log.smbd", dyn_LOGFILEBASE); + lp_set_logfile(logfile); } pstrcpy(remote_machine, "smbd"); -- cgit