1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-11 05:18:09 +03:00

param: rename lp function and variable from 'piddir' to 'pid_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:
Garming Sam 2014-02-03 15:57:21 +13:00 committed by Jeremy Allison
parent 8b8ebb4798
commit ca20ddbe91
11 changed files with 20 additions and 20 deletions

View File

@ -256,7 +256,7 @@ FN_GLOBAL_CONST_STRING(netbios_scope, netbios_scope)
FN_GLOBAL_CONST_STRING(ntp_signd_socket_directory, ntp_signd_socket_directory)
FN_GLOBAL_CONST_STRING(passdb_backend, passdb_backend)
FN_GLOBAL_CONST_STRING(password_server, password_server)
FN_GLOBAL_CONST_STRING(piddir, piddir)
FN_GLOBAL_CONST_STRING(pid_directory, pid_directory)
FN_GLOBAL_CONST_STRING(private_dir, private_dir)
FN_GLOBAL_CONST_STRING(realm, realm)
FN_GLOBAL_CONST_STRING(smb_passwd_file, smb_passwd_file)

View File

@ -3334,7 +3334,7 @@ static struct parm_struct parm_table[] = {
.label = "pid directory",
.type = P_STRING,
.p_class = P_GLOBAL,
.offset = GLOBAL_VAR(piddir),
.offset = GLOBAL_VAR(pid_directory),
.special = NULL,
.enum_list = NULL,
.flags = FLAG_ADVANCED,

View File

@ -328,7 +328,7 @@ struct tevent_req *nbt_getdc_send(TALLOC_CTX *mem_ctx,
if (tevent_req_nomem(state->my_mailslot, req)) {
return tevent_req_post(req, ev);
}
state->nmbd_pid = pidfile_pid(lp_piddir(), "nmbd");
state->nmbd_pid = pidfile_pid(lp_pid_directory(), "nmbd");
if (state->nmbd_pid == 0) {
DEBUG(3, ("No nmbd found\n"));
tevent_req_nterror(req, NT_STATUS_NOT_SUPPORTED);

View File

@ -72,7 +72,7 @@ static void terminate(struct messaging_context *msg)
gencache_stabilize();
serverid_deregister(messaging_server_id(msg));
pidfile_unlink(lp_piddir(), "nmbd");
pidfile_unlink(lp_pid_directory(), "nmbd");
exit(0);
}
@ -976,14 +976,14 @@ static bool open_sockets(bool isdaemon, int port)
exit(1);
}
ok = directory_create_or_exist(lp_piddir(), geteuid(), 0755);
ok = directory_create_or_exist(lp_pid_directory(), geteuid(), 0755);
if (!ok) {
DEBUG(0, ("Failed to create directory %s for pid files - %s\n",
lp_piddir(), strerror(errno)));
lp_pid_directory(), strerror(errno)));
exit(1);
}
pidfile_create(lp_piddir(), "nmbd");
pidfile_create(lp_pid_directory(), "nmbd");
status = reinit_after_fork(msg, nmbd_event_context(),
false);

View File

@ -771,7 +771,7 @@ static void init_globals(bool reinit_globals)
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());
string_set(&Globals.pid_directory, get_dyn_PIDDIR());
string_set(&Globals.nbt_client_socket_address, "0.0.0.0");
/*
* By default support explicit binding to broadcast

View File

@ -1340,11 +1340,11 @@ extern void build_options(bool screen);
if (!directory_exist(lp_lock_directory()))
mkdir(lp_lock_directory(), 0755);
if (!directory_exist(lp_piddir()))
mkdir(lp_piddir(), 0755);
if (!directory_exist(lp_pid_directory()))
mkdir(lp_pid_directory(), 0755);
if (is_daemon)
pidfile_create(lp_piddir(), "smbd");
pidfile_create(lp_pid_directory(), "smbd");
status = reinit_after_fork(msg_ctx,
ev_ctx,

View File

@ -211,7 +211,7 @@ static void exit_server_common(enum server_exit_reason how,
DEBUG(3,("Server exit (%s)\n",
(reason ? reason : "normal exit")));
if (am_parent) {
pidfile_unlink(lp_piddir(), "smbd");
pidfile_unlink(lp_pid_directory(), "smbd");
}
gencache_stabilize();
}

View File

@ -1441,7 +1441,7 @@ static struct server_id parse_dest(struct messaging_context *msg,
/* Look up other destinations in pidfile directory */
if ((pid = pidfile_pid(lp_piddir(), dest)) != 0) {
if ((pid = pidfile_pid(lp_pid_directory(), dest)) != 0) {
return pid_to_procid(pid);
}

View File

@ -118,9 +118,9 @@ static int do_global_checks(void)
lp_cachedir());
}
if (!directory_exist_stat(lp_piddir(), &st)) {
if (!directory_exist_stat(lp_pid_directory(), &st)) {
fprintf(stderr, "ERROR: pid directory %s does not exist\n\n",
lp_piddir());
lp_pid_directory());
ret = 1;
}

View File

@ -217,7 +217,7 @@ static void terminate(bool is_parent)
struct messaging_context *msg = winbind_messaging_context();
struct server_id self = messaging_server_id(msg);
serverid_deregister(self);
pidfile_unlink(lp_piddir(), "winbindd");
pidfile_unlink(lp_pid_directory(), "winbindd");
}
exit(0);
@ -1488,10 +1488,10 @@ int main(int argc, char **argv, char **envp)
exit(1);
}
ok = directory_create_or_exist(lp_piddir(), geteuid(), 0755);
ok = directory_create_or_exist(lp_pid_directory(), geteuid(), 0755);
if (!ok) {
DEBUG(0, ("Failed to create directory %s for pid files - %s\n",
lp_piddir(), strerror(errno)));
lp_pid_directory(), strerror(errno)));
exit(1);
}
@ -1529,7 +1529,7 @@ int main(int argc, char **argv, char **envp)
if (!interactive)
become_daemon(Fork, no_process_group, log_stdout);
pidfile_create(lp_piddir(), "winbindd");
pidfile_create(lp_pid_directory(), "winbindd");
#if HAVE_SETPGID
/*

View File

@ -388,7 +388,7 @@ static int binary_smbd_main(const char *binary_name, int argc, const char *argv[
mkdir(lpcfg_lock_directory(cmdline_lp_ctx), 0755);
}
pidfile_create(lpcfg_piddir(cmdline_lp_ctx), binary_name);
pidfile_create(lpcfg_pid_directory(cmdline_lp_ctx), binary_name);
/* Set up a database to hold a random seed, in case we don't
* have /dev/urandom */