summaryrefslogtreecommitdiff
path: root/source3/smbd
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/smbd
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/smbd')
-rw-r--r--source3/smbd/build_options.c17
-rw-r--r--source3/smbd/lanman.c2
-rw-r--r--source3/smbd/server.c14
3 files changed, 13 insertions, 20 deletions
diff --git a/source3/smbd/build_options.c b/source3/smbd/build_options.c
index d12fe40872..8c22e95451 100644
--- a/source3/smbd/build_options.c
+++ b/source3/smbd/build_options.c
@@ -22,6 +22,7 @@
#include "includes.h"
#include "build_env.h"
+#include "dynconfig.h"
static void output(BOOL screen, char *format, ...) PRINTF_ATTRIBUTE(2,3);
@@ -184,30 +185,22 @@ void build_options(BOOL screen)
/* Output various paths to files and directories */
output(screen,"\nPaths:\n");
-#ifdef CONFIGFILE
- output(screen," CONFIGFILE: %s\n",CONFIGFILE);
-#endif
+ output(screen," CONFIGFILE: %s\n", dyn_CONFIGFILE);
#ifdef PRIVATE_DIR
output(screen," PRIVATE_DIR: %s\n",PRIVATE_DIR);
#endif
#ifdef LMHOSTSFILE
output(screen," LMHOSTSFILE: %s\n",LMHOSTSFILE);
#endif
-#ifdef SBINDIR
- output(screen," SBINDIR: %s\n",SBINDIR);
-#endif
-#ifdef BINDIR
- output(screen," BINDIR: %s\n",BINDIR);
-#endif
+ output(screen," SBINDIR: %s\n", dyn_SBINDIR);
+ output(screen," BINDIR: %s\n", dyn_BINDIR);
#ifdef LOCKDIR
output(screen," LOCKDIR: %s\n",LOCKDIR);
#endif
#ifdef DRIVERFILE
output(screen," DRIVERFILE: %s\n",DRIVERFILE);
#endif
-#ifdef LOGFILEBASE
- output(screen," LOGFILEBASE: %s\n",LOGFILEBASE);
-#endif
+ output(screen," LOGFILEBASE: %s\n", dyn_LOGFILEBASE);
#ifdef FORMSFILE
output(screen," FORMSFILE: %s\n",FORMSFILE);
#endif
diff --git a/source3/smbd/lanman.c b/source3/smbd/lanman.c
index 7ade1e6d47..34dcf6c211 100644
--- a/source3/smbd/lanman.c
+++ b/source3/smbd/lanman.c
@@ -1713,7 +1713,7 @@ static BOOL api_RNetShareAdd(connection_struct *conn,uint16 vuid, char *param,ch
if (!cmdname || *cmdname == '\0') return False;
asprintf(&command, "%s \"%s\" \"%s\" \"%s\" \"%s\"",
- lp_add_share_cmd(), CONFIGFILE, sharename, pathname, comment);
+ lp_add_share_cmd(), dyn_CONFIGFILE, sharename, pathname, comment);
if (command) {
DEBUG(10,("api_RNetShareAdd: Running [%s]\n", command ));
diff --git a/source3/smbd/server.c b/source3/smbd/server.c
index 16a092f152..c48cb37615 100644
--- a/source3/smbd/server.c
+++ b/source3/smbd/server.c
@@ -21,7 +21,6 @@
#include "includes.h"
-pstring servicesf = CONFIGFILE;
extern pstring debugf;
extern fstring global_myworkgroup;
extern pstring global_myname;
@@ -357,8 +356,8 @@ BOOL reload_services(BOOL test)
if (lp_loaded()) {
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;
}
}
@@ -370,7 +369,7 @@ BOOL reload_services(BOOL test)
lp_killunused(conn_snum_used);
- ret = lp_load(servicesf,False,False,True);
+ ret = lp_load(dyn_CONFIGFILE,False,False,True);
load_printers();
@@ -588,7 +587,7 @@ static void usage(char *pname)
int port = SMB_PORT;
int opt;
extern char *optarg;
-
+
#ifdef HAVE_SET_AUTH_PARAMETERS
set_auth_parameters(argc,argv);
#endif
@@ -606,7 +605,7 @@ static void usage(char *pname)
break;
case 's':
- pstrcpy(servicesf,optarg);
+ pstrcpy(dyn_CONFIGFILE,optarg);
break;
case 'l':
@@ -671,7 +670,8 @@ static void usage(char *pname)
TimeInit();
if(!specified_logfile) {
- slprintf(debugf, sizeof(debugf)-1, "%s/log.smbd", LOGFILEBASE);
+ slprintf(debugf, sizeof(debugf)-1, "%s/log.smbd",
+ dyn_LOGFILEBASE);
}
pstrcpy(remote_machine, "smbd");