diff options
author | Andrew Bartlett <abartlet@samba.org> | 2011-06-01 11:51:12 +1000 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2011-06-01 04:19:05 +0200 |
commit | a0758bb5e5035a2547808a1fc89fe4fef51ed90c (patch) | |
tree | 4ca20f6e73d47ab8fd3889adbf5dd0996310b0b6 /source3/param/loadparm.c | |
parent | 9aef68f4c2791227186fa81f1ec19c40df435e18 (diff) | |
download | samba-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
Diffstat (limited to 'source3/param/loadparm.c')
-rw-r--r-- | source3/param/loadparm.c | 10 |
1 files changed, 5 insertions, 5 deletions
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) |