context="G"
advanced="1" developer="1"
type="string"
- generated_function="0"
+ constant="1"
xmlns:samba="http://www.samba.org/samba/DTD/samba-doc">
<description>
<para>Usually, most of the TDB files are stored in the <parameter
context="G"
advanced="1" developer="1"
type="string"
- generated_function="0"
+ constant="1"
xmlns:samba="http://www.samba.org/samba/DTD/samba-doc">
<description>
<para>Usually, most of the TDB files are stored in the
#include "lib/param/param_functions.c"
-/* These functions remain only in lib/param for now */
-FN_GLOBAL_CONST_STRING(cachedir, szCacheDir)
-FN_GLOBAL_CONST_STRING(statedir, szStateDir)
-
/* These functions cannot be auto-generated */
FN_LOCAL_BOOL(autoloaded, autoloaded)
FN_GLOBAL_CONST_STRING(dnsdomain, dnsdomain)
.label = "state directory",
.type = P_STRING,
.p_class = P_GLOBAL,
- .offset = GLOBAL_VAR(szStateDir),
+ .offset = GLOBAL_VAR(state_directory),
.special = NULL,
.enum_list = NULL,
.flags = FLAG_ADVANCED,
.label = "cache directory",
.type = P_STRING,
.p_class = P_GLOBAL,
- .offset = GLOBAL_VAR(szCacheDir),
+ .offset = GLOBAL_VAR(cache_directory),
.special = NULL,
.enum_list = NULL,
.flags = FLAG_ADVANCED,
char *lpcfg_state_path(TALLOC_CTX* mem_ctx, struct loadparm_context *lp_ctx,
const char *name)
{
- return lpcfg_common_path(mem_ctx, lpcfg_statedir(lp_ctx), name);
+ return lpcfg_common_path(mem_ctx, lpcfg_state_directory(lp_ctx), name);
}
/**
char *lpcfg_cache_path(TALLOC_CTX* mem_ctx, struct loadparm_context *lp_ctx,
const char *name)
{
- return lpcfg_common_path(mem_ctx, lpcfg_cachedir(lp_ctx), name);
+ return lpcfg_common_path(mem_ctx, lpcfg_cache_directory(lp_ctx), name);
}
/**
#include "source3/param/param_proto.h"
-const char *lp_statedir(void);
-const char *lp_cachedir(void);
int lp_winbind_max_domain_connections(void);
bool lp_idmap_range(const char *domain_name, uint32_t *low, uint32_t *high);
bool lp_idmap_default_range(uint32_t *low, uint32_t *high);
char *state_path(const char *name)
{
- return xx_path(name, lp_statedir());
+ return xx_path(name, lp_state_directory());
}
/**
char *cache_path(const char *name)
{
- return xx_path(name, lp_cachedir());
+ return xx_path(name, lp_cache_directory());
}
/*******************************************************************
char *szLdapUserSuffix; \
char *szLdapIdmapSuffix; \
char *szLdapGroupSuffix; \
- char *szStateDir; \
- char *szCacheDir; \
char *szIdmapUID; \
char *szIdmapGID; \
char *szIdmapBackend; \
string_set(&Globals.passwd_program, "");
string_set(&Globals.lock_directory, get_dyn_LOCKDIR());
- string_set(&Globals.szStateDir, get_dyn_STATEDIR());
- string_set(&Globals.szCacheDir, get_dyn_CACHEDIR());
+ string_set(&Globals.state_directory, get_dyn_STATEDIR());
+ string_set(&Globals.cache_directory, get_dyn_CACHEDIR());
string_set(&Globals.pid_directory, get_dyn_PIDDIR());
string_set(&Globals.nbt_client_socket_address, "0.0.0.0");
/*
#define FN_LOCAL_PARM_CHAR(fn_name,val) \
char lp_ ## fn_name(const struct share_params *p) {return(LP_SNUM_OK(p->service)? ServicePtrs[(p->service)]->val : sDefault.val);}
-
-/* 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_lock_directory(). */
-const char *lp_statedir(void) {
- if ((strcmp(get_dyn_STATEDIR(), get_dyn_LOCKDIR()) != 0) ||
- (strcmp(get_dyn_STATEDIR(), Globals.szStateDir) != 0))
- return(*(char **)(&Globals.szStateDir) ?
- *(char **)(&Globals.szStateDir) : "");
- else
- return(*(char **)(&Globals.lock_directory) ?
- *(char **)(&Globals.lock_directory) : "");
-}
-const char *lp_cachedir(void) {
- if ((strcmp(get_dyn_CACHEDIR(), get_dyn_LOCKDIR()) != 0) ||
- (strcmp(get_dyn_CACHEDIR(), Globals.szCacheDir) != 0))
- return(*(char **)(&Globals.szCacheDir) ?
- *(char **)(&Globals.szCacheDir) : "");
- else
- return(*(char **)(&Globals.lock_directory) ?
- *(char **)(&Globals.lock_directory) : "");
-}
static FN_GLOBAL_INTEGER(winbind_max_domain_connections_int,
winbindMaxDomainConnections)
lp_lock_directory());
}
- if (!directory_exist_stat(lp_statedir(), &st)) {
+ if (!directory_exist_stat(lp_state_directory(), &st)) {
fprintf(stderr, "ERROR: state directory %s does not exist\n\n",
- lp_statedir());
+ lp_state_directory());
ret = 1;
} else if ((st.st_ex_mode & 0777) != 0755) {
fprintf(stderr, "WARNING: state directory %s should have "
"permissions 0755 for browsing to work\n\n",
- lp_statedir());
+ lp_state_directory());
}
- if (!directory_exist_stat(lp_cachedir(), &st)) {
+ if (!directory_exist_stat(lp_cache_directory(), &st)) {
fprintf(stderr, "ERROR: cache directory %s does not exist\n\n",
- lp_cachedir());
+ lp_cache_directory());
ret = 1;
} else if ((st.st_ex_mode & 0777) != 0755) {
fprintf(stderr, "WARNING: cache directory %s should have "
"permissions 0755 for browsing to work\n\n",
- lp_cachedir());
+ lp_cache_directory());
}
if (!directory_exist_stat(lp_pid_directory(), &st)) {