mirror of
https://github.com/samba-team/samba.git
synced 2024-12-22 13:34:15 +03:00
param: rename lp function and variable from 'lockdir' to 'lock_directory'
Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
This commit is contained in:
parent
e23c7adb1a
commit
63c24977ba
@ -244,7 +244,7 @@ FN_GLOBAL_CONST_STRING(dnsdomain, dnsdomain)
|
||||
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)
|
||||
|
@ -3298,7 +3298,7 @@ static struct parm_struct parm_table[] = {
|
||||
.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,
|
||||
@ -3307,7 +3307,7 @@ static struct parm_struct parm_table[] = {
|
||||
.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,
|
||||
|
@ -114,7 +114,7 @@ static char *lpcfg_common_path(TALLOC_CTX* mem_ctx,
|
||||
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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -39,7 +39,7 @@ typedef char fstring[FSTRING_LEN];
|
||||
*/
|
||||
#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"
|
||||
|
@ -1517,7 +1517,7 @@ static char *xx_path(const char *name, const char *rootpath)
|
||||
|
||||
char *lock_path(const char *name)
|
||||
{
|
||||
return xx_path(name, lp_lockdir());
|
||||
return xx_path(name, lp_lock_directory());
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -969,10 +969,10 @@ static bool open_sockets(bool isdaemon, int port)
|
||||
}
|
||||
#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);
|
||||
}
|
||||
|
||||
|
@ -157,7 +157,7 @@ done:
|
||||
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;
|
||||
}
|
||||
|
@ -768,7 +768,7 @@ static void init_globals(bool reinit_globals)
|
||||
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());
|
||||
@ -1172,15 +1172,15 @@ static FN_GLOBAL_BOOL(_writeraw, bWriteRaw)
|
||||
|
||||
/* 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) ||
|
||||
@ -1188,8 +1188,8 @@ const char *lp_cachedir(void) {
|
||||
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)
|
||||
|
@ -49,7 +49,7 @@ static bool irix_oplocks_available(void)
|
||||
|
||||
tmpname = talloc_asprintf(ctx,
|
||||
"%s/koplock.%d",
|
||||
lp_lockdir(),
|
||||
lp_lock_directory(),
|
||||
(int)getpid());
|
||||
if (!tmpname) {
|
||||
TALLOC_FREE(ctx);
|
||||
|
@ -3088,7 +3088,7 @@ bool fork_echo_handler(struct smbd_server_connection *sconn)
|
||||
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;
|
||||
|
@ -1337,8 +1337,8 @@ extern void build_options(bool screen);
|
||||
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);
|
||||
|
@ -88,14 +88,14 @@ static int do_global_checks(void)
|
||||
"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)) {
|
||||
|
@ -1481,10 +1481,10 @@ int main(int argc, char **argv, char **envp)
|
||||
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);
|
||||
}
|
||||
|
||||
|
@ -823,7 +823,7 @@ _PUBLIC_ struct composite_context* dcerpc_pipe_connect_b_send(TALLOC_CTX *parent
|
||||
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;
|
||||
|
@ -388,7 +388,7 @@ _PUBLIC_ NTSTATUS dcesrv_endpoint_connect(struct dcesrv_context *dce_ctx,
|
||||
|
||||
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;
|
||||
|
@ -384,8 +384,8 @@ static int binary_smbd_main(const char *binary_name, int argc, const char *argv[
|
||||
|
||||
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);
|
||||
|
Loading…
Reference in New Issue
Block a user