summaryrefslogtreecommitdiff
path: root/source3/nsswitch
diff options
context:
space:
mode:
authorMartin Pool <mbp@samba.org>2001-11-19 02:49:53 +0000
committerMartin Pool <mbp@samba.org>2001-11-19 02:49:53 +0000
commitf741f656737f4ec46cd318e986b6bf412ed309d2 (patch)
treefb2b1999441e25ae5db177631dd42abb051a9bce /source3/nsswitch
parenta1b9de0b9872b91574e75bb360d49b887a072389 (diff)
downloadsamba-f741f656737f4ec46cd318e986b6bf412ed309d2.tar.gz
samba-f741f656737f4ec46cd318e986b6bf412ed309d2.tar.bz2
samba-f741f656737f4ec46cd318e986b6bf412ed309d2.zip
Store some path names in global variables initialized to configure
default, rather than in preprocessor macros. (This used to be commit 79ec88f0da40faebe1e587f1b3e87b5f2b184f58)
Diffstat (limited to 'source3/nsswitch')
-rw-r--r--source3/nsswitch/wbinfo.c2
-rw-r--r--source3/nsswitch/winbindd.c12
-rw-r--r--source3/nsswitch/wins.c2
3 files changed, 7 insertions, 9 deletions
diff --git a/source3/nsswitch/wbinfo.c b/source3/nsswitch/wbinfo.c
index d154615db6..8dd2e44caa 100644
--- a/source3/nsswitch/wbinfo.c
+++ b/source3/nsswitch/wbinfo.c
@@ -461,7 +461,7 @@ int main(int argc, char **argv)
TimeInit();
- if (!lp_load(CONFIGFILE, True, False, False)) {
+ if (!lp_load(dyn_CONFIGFILE, True, False, False)) {
DEBUG(0, ("error opening config file\n"));
exit(1);
}
diff --git a/source3/nsswitch/winbindd.c b/source3/nsswitch/winbindd.c
index 30e5f41b9e..56ed17464b 100644
--- a/source3/nsswitch/winbindd.c
+++ b/source3/nsswitch/winbindd.c
@@ -23,8 +23,6 @@
#include "winbindd.h"
-pstring servicesf = CONFIGFILE;
-
/* List of all connected clients */
struct winbindd_cli_state *client_list;
@@ -40,14 +38,14 @@ static BOOL reload_services_file(BOOL test)
pstring fname;
pstrcpy(fname,lp_configfile());
- if (file_exist(fname,NULL) && !strcsequal(fname,servicesf)) {
- pstrcpy(servicesf,fname);
+ if (file_exist(fname,NULL) && !strcsequal(fname,dyn_CONFIGFILE)) {
+ pstrcpy(dyn_CONFIGFILE,fname);
test = False;
}
}
reopen_logs();
- ret = lp_load(servicesf,False,False,True);
+ ret = lp_load(dyn_CONFIGFILE,False,False,True);
reopen_logs();
load_interfaces();
@@ -713,7 +711,7 @@ int main(int argc, char **argv)
/* Load a different smb.conf file */
case 's':
- pstrcpy(servicesf,optarg);
+ pstrcpy(dyn_CONFIGFILE,optarg);
break;
default:
@@ -722,7 +720,7 @@ int main(int argc, char **argv)
}
}
- snprintf(debugf, sizeof(debugf), "%s/log.winbindd", LOGFILEBASE);
+ snprintf(debugf, sizeof(debugf), "%s/log.winbindd", dyn_LOGFILEBASE);
setup_logging("winbindd", interactive);
reopen_logs();
diff --git a/source3/nsswitch/wins.c b/source3/nsswitch/wins.c
index a3d5bb08de..b66ef88e04 100644
--- a/source3/nsswitch/wins.c
+++ b/source3/nsswitch/wins.c
@@ -75,7 +75,7 @@ struct in_addr *lookup_backend(const char *name, int *count)
DEBUGLEVEL = 0;
TimeInit();
setup_logging("nss_wins",True);
- lp_load(CONFIGFILE,True,False,False);
+ lp_load(dyn_CONFIGFILE,True,False,False);
load_interfaces();
}