summaryrefslogtreecommitdiff
path: root/source3/nsswitch
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/nsswitch
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/nsswitch')
-rw-r--r--source3/nsswitch/winbindd.c18
1 files changed, 13 insertions, 5 deletions
diff --git a/source3/nsswitch/winbindd.c b/source3/nsswitch/winbindd.c
index c10cd9e2ca..e68708469c 100644
--- a/source3/nsswitch/winbindd.c
+++ b/source3/nsswitch/winbindd.c
@@ -23,8 +23,6 @@
#include "winbindd.h"
-extern pstring debugf;
-
/* List of all connected clients */
struct winbindd_cli_state *client_list;
@@ -36,6 +34,7 @@ BOOL opt_nocache;
static BOOL reload_services_file(BOOL test)
{
BOOL ret;
+ pstring logfile;
if (lp_loaded()) {
pstring fname;
@@ -47,9 +46,15 @@ static BOOL reload_services_file(BOOL test)
}
}
+ snprintf(logfile, sizeof(logfile), "%s/log.winbindd", dyn_LOGFILEBASE);
+ lp_set_logfile(logfile);
+
reopen_logs();
ret = lp_load(dyn_CONFIGFILE,False,False,True);
+ snprintf(logfile, sizeof(logfile), "%s/log.winbindd", dyn_LOGFILEBASE);
+ lp_set_logfile(logfile);
+
reopen_logs();
load_interfaces();
@@ -66,7 +71,7 @@ static BOOL dump_core(void)
{
char *p;
pstring dname;
- pstrcpy( dname, debugf );
+ pstrcpy( dname, lp_logfile() );
if ((p=strrchr(dname,'/')))
*p=0;
pstrcat( dname, "/corefiles" );
@@ -725,6 +730,7 @@ int main(int argc, char **argv)
{
extern pstring global_myname;
extern fstring global_myworkgroup;
+ pstring logfile;
int accept_sock;
BOOL interactive = False;
int opt, new_debuglevel = -1;
@@ -735,7 +741,8 @@ int main(int argc, char **argv)
CatchSignal(SIGUSR1, SIG_IGN);
fault_setup((void (*)(void *))fault_quit );
- snprintf(debugf, sizeof(debugf), "%s/log.winbindd", dyn_LOGFILEBASE);
+ snprintf(logfile, sizeof(logfile), "%s/log.winbindd", dyn_LOGFILEBASE);
+ lp_set_logfile(logfile);
/* Initialise for running in non-root mode */
@@ -777,7 +784,8 @@ int main(int argc, char **argv)
}
}
- snprintf(debugf, sizeof(debugf), "%s/log.winbindd", dyn_LOGFILEBASE);
+ snprintf(logfile, sizeof(logfile), "%s/log.winbindd", dyn_LOGFILEBASE);
+ lp_set_logfile(logfile);
setup_logging("winbindd", interactive);
reopen_logs();