summaryrefslogtreecommitdiff
path: root/source3/smbd
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/smbd
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/smbd')
-rw-r--r--source3/smbd/server.c12
1 files changed, 7 insertions, 5 deletions
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");