summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2011-06-01 11:51:12 +1000
committerAndrew Bartlett <abartlet@samba.org>2011-06-01 04:19:05 +0200
commita0758bb5e5035a2547808a1fc89fe4fef51ed90c (patch)
tree4ca20f6e73d47ab8fd3889adbf5dd0996310b0b6
parent9aef68f4c2791227186fa81f1ec19c40df435e18 (diff)
downloadsamba-a0758bb5e5035a2547808a1fc89fe4fef51ed90c.tar.gz
samba-a0758bb5e5035a2547808a1fc89fe4fef51ed90c.tar.bz2
samba-a0758bb5e5035a2547808a1fc89fe4fef51ed90c.zip
s3-param Make lp_cachedir() const
This disables % substitutions in the 'cache dir' parameter. This is used all over the codebase, and need to be internally consistent between all the Samba tasks. Andrew Bartlett
-rw-r--r--source3/include/proto.h2
-rw-r--r--source3/param/loadparm.c10
2 files changed, 6 insertions, 6 deletions
diff --git a/source3/include/proto.h b/source3/include/proto.h
index 2c34c58968..2fe6b2d5e3 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -1192,7 +1192,7 @@ char *lp_deleteprinter_cmd(void);
char *lp_os2_driver_map(void);
const char *lp_lockdir(void);
const char *lp_statedir(void);
-char *lp_cachedir(void);
+const char *lp_cachedir(void);
char *lp_piddir(void);
char *lp_mangling_method(void);
int lp_mangle_prefix(void);
diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c
index daf8955028..3ecae2e184 100644
--- a/source3/param/loadparm.c
+++ b/source3/param/loadparm.c
@@ -5592,14 +5592,14 @@ const char *lp_statedir(void) {
return(*(char **)(&Globals.szLockDir) ?
*(char **)(&Globals.szLockDir) : "");
}
-char *lp_cachedir(void) {
+const char *lp_cachedir(void) {
if ((strcmp(get_dyn_CACHEDIR(), get_dyn_LOCKDIR()) != 0) ||
(strcmp(get_dyn_CACHEDIR(), Globals.szCacheDir) != 0))
- return(lp_string(*(char **)(&Globals.szCacheDir) ?
- *(char **)(&Globals.szCacheDir) : ""));
+ return(*(char **)(&Globals.szCacheDir) ?
+ *(char **)(&Globals.szCacheDir) : "");
else
- return(lp_string(*(char **)(&Globals.szLockDir) ?
- *(char **)(&Globals.szLockDir) : ""));
+ return(*(char **)(&Globals.szLockDir) ?
+ *(char **)(&Globals.szLockDir) : "");
}
FN_GLOBAL_STRING(lp_piddir, &Globals.szPidDir)
FN_GLOBAL_STRING(lp_mangling_method, &Globals.szManglingMethod)