summaryrefslogtreecommitdiff
path: root/source3/param
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2011-06-01 11:48:38 +1000
committerAndrew Bartlett <abartlet@samba.org>2011-06-01 04:19:05 +0200
commit9aef68f4c2791227186fa81f1ec19c40df435e18 (patch)
tree6e0aba8df0d14b4ef6333da3869b0875a805d12c /source3/param
parent5f176378a802703778ae07c36e95fe186b6e57a8 (diff)
downloadsamba-9aef68f4c2791227186fa81f1ec19c40df435e18.tar.gz
samba-9aef68f4c2791227186fa81f1ec19c40df435e18.tar.bz2
samba-9aef68f4c2791227186fa81f1ec19c40df435e18.zip
s3-param Make lp_statedir() const
This disables % substitutions in the 'state dir' parameter. This is used all over the codebase, and need to be internally consistent between all the Samba tasks. Andrew Bartlett
Diffstat (limited to 'source3/param')
-rw-r--r--source3/param/loadparm.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c
index 808d4f714c..daf8955028 100644
--- a/source3/param/loadparm.c
+++ b/source3/param/loadparm.c
@@ -5583,14 +5583,14 @@ FN_GLOBAL_CONST_STRING(lp_lockdir, &Globals.szLockDir)
/* If lp_statedir() and lp_cachedir() are explicitely set during the
* build process or in smb.conf, we use that value. Otherwise they
* default to the value of lp_lockdir(). */
-char *lp_statedir(void) {
+const char *lp_statedir(void) {
if ((strcmp(get_dyn_STATEDIR(), get_dyn_LOCKDIR()) != 0) ||
(strcmp(get_dyn_STATEDIR(), Globals.szStateDir) != 0))
- return(lp_string(*(char **)(&Globals.szStateDir) ?
- *(char **)(&Globals.szStateDir) : ""));
+ return(*(char **)(&Globals.szStateDir) ?
+ *(char **)(&Globals.szStateDir) : "");
else
- return(lp_string(*(char **)(&Globals.szLockDir) ?
- *(char **)(&Globals.szLockDir) : ""));
+ return(*(char **)(&Globals.szLockDir) ?
+ *(char **)(&Globals.szLockDir) : "");
}
char *lp_cachedir(void) {
if ((strcmp(get_dyn_CACHEDIR(), get_dyn_LOCKDIR()) != 0) ||