FN_GLOBAL_CONST_STRING(dns_forwarder, dns_forwarder)
FN_GLOBAL_CONST_STRING(dos_charset, dos_charset)
FN_GLOBAL_CONST_STRING(guest_account, guest_account)
-FN_GLOBAL_CONST_STRING(lockdir, lockdir)
+FN_GLOBAL_CONST_STRING(lock_directory, lock_directory)
FN_GLOBAL_CONST_STRING(logon_drive, logon_drive)
FN_GLOBAL_CONST_STRING(logon_home, logon_home)
FN_GLOBAL_CONST_STRING(logon_path, logon_path)
.label = "lock directory",
.type = P_STRING,
.p_class = P_GLOBAL,
- .offset = GLOBAL_VAR(lockdir),
+ .offset = GLOBAL_VAR(lock_directory),
.special = NULL,
.enum_list = NULL,
.flags = FLAG_ADVANCED,
.label = "lock dir",
.type = P_STRING,
.p_class = P_GLOBAL,
- .offset = GLOBAL_VAR(lockdir),
+ .offset = GLOBAL_VAR(lock_directory),
.special = NULL,
.enum_list = NULL,
.flags = FLAG_HIDE,
char *lpcfg_lock_path(TALLOC_CTX* mem_ctx, struct loadparm_context *lp_ctx,
const char *name)
{
- return lpcfg_common_path(mem_ctx, lpcfg_lockdir(lp_ctx), name);
+ return lpcfg_common_path(mem_ctx, lpcfg_lock_directory(lp_ctx), name);
}
/**
*/
#define WINBINDD_SOCKET_DIR_ENVVAR "WINBINDD_SOCKET_DIR"
-#define WINBINDD_PRIV_SOCKET_SUBDIR "winbindd_privileged" /* name of subdirectory of lp_lockdir() to hold the 'privileged' pipe */
+#define WINBINDD_PRIV_SOCKET_SUBDIR "winbindd_privileged" /* name of subdirectory of lp_lock_directory() to hold the 'privileged' pipe */
#define WINBINDD_DOMAIN_ENV "WINBINDD_DOMAIN" /* Environment variables */
#define WINBINDD_DONT_ENV "_NO_WINBINDD"
#define WINBINDD_LOCATOR_KDC_ADDRESS "WINBINDD_LOCATOR_KDC_ADDRESS"
char *lock_path(const char *name)
{
- return xx_path(name, lp_lockdir());
+ return xx_path(name, lp_lock_directory());
}
/**
}
#endif
- ok = directory_create_or_exist(lp_lockdir(), geteuid(), 0755);
+ ok = directory_create_or_exist(lp_lock_directory(), geteuid(), 0755);
if (!ok) {
DEBUG(0, ("Failed to create directory %s for lock files - %s\n",
- lp_lockdir(), strerror(errno)));
+ lp_lock_directory(), strerror(errno)));
exit(1);
}
unstrcpy(s->server, name);
s->ip = ip;
- if (asprintf(&s->fname, "%s/sync.%d", lp_lockdir(), counter++) < 0) {
+ if (asprintf(&s->fname, "%s/sync.%d", lp_lock_directory(), counter++) < 0) {
SAFE_FREE(s);
goto done;
}
string_set(&Globals.workgroup, DEFAULT_WORKGROUP);
string_set(&Globals.passwd_program, "");
- string_set(&Globals.lockdir, get_dyn_LOCKDIR());
+ 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.piddir, get_dyn_PIDDIR());
/* 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(). */
+ * 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.lockdir) ?
- *(char **)(&Globals.lockdir) : "");
+ return(*(char **)(&Globals.lock_directory) ?
+ *(char **)(&Globals.lock_directory) : "");
}
const char *lp_cachedir(void) {
if ((strcmp(get_dyn_CACHEDIR(), get_dyn_LOCKDIR()) != 0) ||
return(*(char **)(&Globals.szCacheDir) ?
*(char **)(&Globals.szCacheDir) : "");
else
- return(*(char **)(&Globals.lockdir) ?
- *(char **)(&Globals.lockdir) : "");
+ return(*(char **)(&Globals.lock_directory) ?
+ *(char **)(&Globals.lock_directory) : "");
}
static FN_GLOBAL_INTEGER(winbind_max_domain_connections_int,
winbindMaxDomainConnections)
tmpname = talloc_asprintf(ctx,
"%s/koplock.%d",
- lp_lockdir(),
+ lp_lock_directory(),
(int)getpid());
if (!tmpname) {
TALLOC_FREE(ctx);
DEBUG(1, ("pipe() failed: %s\n", strerror(errno)));
return false;
}
- sconn->smb1.echo_handler.socket_lock_fd = create_unlink_tmp(lp_lockdir());
+ sconn->smb1.echo_handler.socket_lock_fd = create_unlink_tmp(lp_lock_directory());
if (sconn->smb1.echo_handler.socket_lock_fd == -1) {
DEBUG(1, ("Could not create lock fd: %s\n", strerror(errno)));
goto fail;
setpgid( (pid_t)0, (pid_t)0);
#endif
- if (!directory_exist(lp_lockdir()))
- mkdir(lp_lockdir(), 0755);
+ if (!directory_exist(lp_lock_directory()))
+ mkdir(lp_lock_directory(), 0755);
if (!directory_exist(lp_piddir()))
mkdir(lp_piddir(), 0755);
"must differ.\n\n");
}
- if (!directory_exist_stat(lp_lockdir(), &st)) {
+ if (!directory_exist_stat(lp_lock_directory(), &st)) {
fprintf(stderr, "ERROR: lock directory %s does not exist\n\n",
- lp_lockdir());
+ lp_lock_directory());
ret = 1;
} else if ((st.st_ex_mode & 0777) != 0755) {
fprintf(stderr, "WARNING: lock directory %s should have "
"permissions 0755 for browsing to work\n\n",
- lp_lockdir());
+ lp_lock_directory());
}
if (!directory_exist_stat(lp_statedir(), &st)) {
exit(1);
}
- ok = directory_create_or_exist(lp_lockdir(), geteuid(), 0755);
+ ok = directory_create_or_exist(lp_lock_directory(), geteuid(), 0755);
if (!ok) {
DEBUG(0, ("Failed to create directory %s for lock files - %s\n",
- lp_lockdir(), strerror(errno)));
+ lp_lock_directory(), strerror(errno)));
exit(1);
}
if (composite_nomem(s->pipe, c)) return c;
if (DEBUGLEVEL >= 10)
- s->pipe->conn->packet_log_dir = lpcfg_lockdir(lp_ctx);
+ s->pipe->conn->packet_log_dir = lpcfg_lock_directory(lp_ctx);
/* store parameters in state structure */
s->binding = binding;
p->dce_ctx = dce_ctx;
p->endpoint = ep;
- p->packet_log_dir = lpcfg_lockdir(dce_ctx->lp_ctx);
+ p->packet_log_dir = lpcfg_lock_directory(dce_ctx->lp_ctx);
p->auth_state.session_info = session_info;
p->auth_state.session_key = dcesrv_generic_session_key;
p->event_ctx = event_ctx;
cleanup_tmp_files(cmdline_lp_ctx);
- if (!directory_exist(lpcfg_lockdir(cmdline_lp_ctx))) {
- mkdir(lpcfg_lockdir(cmdline_lp_ctx), 0755);
+ if (!directory_exist(lpcfg_lock_directory(cmdline_lp_ctx))) {
+ mkdir(lpcfg_lock_directory(cmdline_lp_ctx), 0755);
}
pidfile_create(lpcfg_piddir(cmdline_lp_ctx), binary_name);