summaryrefslogtreecommitdiff
path: root/source4/smbd
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2010-07-16 14:32:42 +1000
committerAndrew Tridgell <tridge@samba.org>2010-07-16 18:24:27 +1000
commit6b266b85cf34145ac1f03d8f787b81121e4ec92b (patch)
tree9f6faebdcf58c73e0297bfdf3b905ef256f8e478 /source4/smbd
parente4c35c5a09dd66c9280caa39130b7e3b941b7e51 (diff)
downloadsamba-6b266b85cf34145ac1f03d8f787b81121e4ec92b.tar.gz
samba-6b266b85cf34145ac1f03d8f787b81121e4ec92b.tar.bz2
samba-6b266b85cf34145ac1f03d8f787b81121e4ec92b.zip
s4-loadparm: 2nd half of lp_ to lpcfg_ conversion
this converts all callers that use the Samba4 loadparm lp_ calling convention to use the lpcfg_ prefix. Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'source4/smbd')
-rw-r--r--source4/smbd/process_model.h4
-rw-r--r--source4/smbd/process_prefork.c4
-rw-r--r--source4/smbd/process_single.c6
-rw-r--r--source4/smbd/process_standard.c4
-rw-r--r--source4/smbd/process_thread.c6
-rw-r--r--source4/smbd/server.c14
-rw-r--r--source4/smbd/service_named_pipe.c2
-rw-r--r--source4/smbd/service_stream.c6
-rw-r--r--source4/smbd/service_task.c2
9 files changed, 24 insertions, 24 deletions
diff --git a/source4/smbd/process_model.h b/source4/smbd/process_model.h
index 29f57d9df6..1d3e32eb34 100644
--- a/source4/smbd/process_model.h
+++ b/source4/smbd/process_model.h
@@ -55,7 +55,7 @@ struct model_ops {
/* function to create a task */
void (*new_task)(struct tevent_context *,
- struct loadparm_context *lp_ctx,
+ struct loadparm_context *lp_ctx,
const char *service_name,
void (*)(struct tevent_context *,
struct loadparm_context *, struct server_id,
@@ -63,7 +63,7 @@ struct model_ops {
void *);
/* function to terminate a connection or task */
- void (*terminate)(struct tevent_context *, struct loadparm_context *lp_ctx,
+ void (*terminate)(struct tevent_context *, struct loadparm_context *lp_ctx,
const char *reason);
/* function to set a title for the connection or task */
diff --git a/source4/smbd/process_prefork.c b/source4/smbd/process_prefork.c
index fd1dc88fb1..cec5665237 100644
--- a/source4/smbd/process_prefork.c
+++ b/source4/smbd/process_prefork.c
@@ -94,7 +94,7 @@ static void prefork_accept_connection(struct tevent_context *ev,
static void prefork_new_task(struct tevent_context *ev,
struct loadparm_context *lp_ctx,
const char *service_name,
- void (*new_task_fn)(struct tevent_context *, struct loadparm_context *lp_ctx, struct server_id , void *),
+ void (*new_task_fn)(struct tevent_context *, struct loadparm_context *lp_ctx, struct server_id , void *),
void *private_data)
{
pid_t pid;
@@ -133,7 +133,7 @@ static void prefork_new_task(struct tevent_context *ev,
/* setup this new connection: process will bind to it's sockets etc */
new_task_fn(ev2, lp_ctx, cluster_id(pid, 0), private_data);
- num_children = lp_parm_int(lp_ctx, NULL, "prefork children", service_name, 0);
+ num_children = lpcfg_parm_int(lp_ctx, NULL, "prefork children", service_name, 0);
if (num_children == 0) {
/* We don't want any kids hanging around for this one,
diff --git a/source4/smbd/process_single.c b/source4/smbd/process_single.c
index ec5f529aa1..688b46e0a0 100644
--- a/source4/smbd/process_single.c
+++ b/source4/smbd/process_single.c
@@ -71,7 +71,7 @@ static void single_accept_connection(struct tevent_context *ev,
/* The cluster_id(0, fd) cannot collide with the incrementing
* task below, as the first component is 0, not 1 */
- new_conn(ev, lp_ctx, connected_socket,
+ new_conn(ev, lp_ctx, connected_socket,
cluster_id(0, socket_get_fd(connected_socket)), private_data);
}
@@ -79,7 +79,7 @@ static void single_accept_connection(struct tevent_context *ev,
called to startup a new task
*/
static void single_new_task(struct tevent_context *ev,
- struct loadparm_context *lp_ctx,
+ struct loadparm_context *lp_ctx,
const char *service_name,
void (*new_task)(struct tevent_context *, struct loadparm_context *, struct server_id, void *),
void *private_data)
@@ -97,7 +97,7 @@ static void single_new_task(struct tevent_context *ev,
/* called when a task goes down */
-static void single_terminate(struct tevent_context *ev, struct loadparm_context *lp_ctx, const char *reason)
+static void single_terminate(struct tevent_context *ev, struct loadparm_context *lp_ctx, const char *reason)
{
DEBUG(3,("single_terminate: reason[%s]\n",reason));
}
diff --git a/source4/smbd/process_standard.c b/source4/smbd/process_standard.c
index 6a7e8833eb..5ee8e6948d 100644
--- a/source4/smbd/process_standard.c
+++ b/source4/smbd/process_standard.c
@@ -156,7 +156,7 @@ static void standard_accept_connection(struct tevent_context *ev,
static void standard_new_task(struct tevent_context *ev,
struct loadparm_context *lp_ctx,
const char *service_name,
- void (*new_task)(struct tevent_context *, struct loadparm_context *lp_ctx, struct server_id , void *),
+ void (*new_task)(struct tevent_context *, struct loadparm_context *lp_ctx, struct server_id , void *),
void *private_data)
{
pid_t pid;
@@ -202,7 +202,7 @@ static void standard_new_task(struct tevent_context *ev,
/* called when a task goes down */
-_NORETURN_ static void standard_terminate(struct tevent_context *ev, struct loadparm_context *lp_ctx,
+_NORETURN_ static void standard_terminate(struct tevent_context *ev, struct loadparm_context *lp_ctx,
const char *reason)
{
DEBUG(2,("standard_terminate: reason[%s]\n",reason));
diff --git a/source4/smbd/process_thread.c b/source4/smbd/process_thread.c
index e17769d34e..8af785dd40 100644
--- a/source4/smbd/process_thread.c
+++ b/source4/smbd/process_thread.c
@@ -62,7 +62,7 @@ static void *thread_connection_fn(void *thread_parm)
called when a listening socket becomes readable
*/
static void thread_accept_connection(struct tevent_context *ev,
- struct loadparm_context *lp_ctx,
+ struct loadparm_context *lp_ctx,
struct socket_context *sock,
void (*new_conn)(struct tevent_context *,
struct loadparm_context *,
@@ -132,7 +132,7 @@ static void *thread_task_fn(void *thread_parm)
{
struct new_task_state *new_task = talloc_get_type(thread_parm, struct new_task_state);
- new_task->new_task(new_task->ev, new_task->lp_ctx, pthread_self(),
+ new_task->new_task(new_task->ev, new_task->lp_ctx, pthread_self(),
new_task->private_data);
/* run this connection from here */
@@ -188,7 +188,7 @@ static void thread_new_task(struct tevent_context *ev,
}
/* called when a task goes down */
-static void thread_terminate(struct tevent_context *event_ctx, struct loadparm_context *lp_ctx, const char *reason)
+static void thread_terminate(struct tevent_context *event_ctx, struct loadparm_context *lp_ctx, const char *reason)
{
DEBUG(10,("thread_terminate: reason[%s]\n",reason));
diff --git a/source4/smbd/server.c b/source4/smbd/server.c
index 11415a1424..60269d003e 100644
--- a/source4/smbd/server.c
+++ b/source4/smbd/server.c
@@ -219,7 +219,7 @@ static NTSTATUS setup_parent_messaging(struct tevent_context *event_ctx,
NTSTATUS status;
msg = messaging_init(talloc_autofree_context(),
- lp_messaging_path(event_ctx, lp_ctx),
+ lpcfg_messaging_path(event_ctx, lp_ctx),
cluster_id(0, SAMBA_PARENT_TASKID), event_ctx);
NT_STATUS_HAVE_NO_MEMORY(msg);
@@ -388,11 +388,11 @@ static int binary_smbd_main(const char *binary_name, int argc, const char *argv[
cleanup_tmp_files(cmdline_lp_ctx);
- if (!directory_exist(lp_lockdir(cmdline_lp_ctx))) {
- mkdir(lp_lockdir(cmdline_lp_ctx), 0755);
+ if (!directory_exist(lpcfg_lockdir(cmdline_lp_ctx))) {
+ mkdir(lpcfg_lockdir(cmdline_lp_ctx), 0755);
}
- pidfile_create(lp_piddir(cmdline_lp_ctx), binary_name);
+ pidfile_create(lpcfg_piddir(cmdline_lp_ctx), binary_name);
/* Do *not* remove this, until you have removed
* passdb/secrets.c, and proved that Samba still builds... */
@@ -401,8 +401,8 @@ static int binary_smbd_main(const char *binary_name, int argc, const char *argv[
return 1;
}
- if (lp_server_role(cmdline_lp_ctx) == ROLE_DOMAIN_CONTROLLER) {
- if (!open_schannel_session_store(talloc_autofree_context(), lp_private_dir(cmdline_lp_ctx))) {
+ if (lpcfg_server_role(cmdline_lp_ctx) == ROLE_DOMAIN_CONTROLLER) {
+ if (!open_schannel_session_store(talloc_autofree_context(), lpcfg_private_dir(cmdline_lp_ctx))) {
DEBUG(0,("ERROR: Samba cannot open schannel store for secured NETLOGON operations.\n"));
exit(1);
}
@@ -471,7 +471,7 @@ static int binary_smbd_main(const char *binary_name, int argc, const char *argv[
DEBUG(0,("%s: using '%s' process model\n", binary_name, model));
status = server_service_startup(event_ctx, cmdline_lp_ctx, model,
- lp_server_services(cmdline_lp_ctx));
+ lpcfg_server_services(cmdline_lp_ctx));
if (!NT_STATUS_IS_OK(status)) {
DEBUG(0,("Starting Services failed - %s\n", nt_errstr(status)));
return 1;
diff --git a/source4/smbd/service_named_pipe.c b/source4/smbd/service_named_pipe.c
index 81f9878d55..84b490ac2d 100644
--- a/source4/smbd/service_named_pipe.c
+++ b/source4/smbd/service_named_pipe.c
@@ -312,7 +312,7 @@ NTSTATUS tstream_setup_named_pipe(struct tevent_context *event_context,
goto fail;
}
- dirname = talloc_asprintf(pipe_sock, "%s/np", lp_ncalrpc_dir(lp_ctx));
+ dirname = talloc_asprintf(pipe_sock, "%s/np", lpcfg_ncalrpc_dir(lp_ctx));
if (dirname == NULL) {
goto fail;
}
diff --git a/source4/smbd/service_stream.c b/source4/smbd/service_stream.c
index 8c38f27d74..85efa34339 100644
--- a/source4/smbd/service_stream.c
+++ b/source4/smbd/service_stream.c
@@ -173,7 +173,7 @@ static void stream_new_connection(struct tevent_context *ev,
srv_conn->event.ctx = ev;
srv_conn->lp_ctx = lp_ctx;
- if (!socket_check_access(sock, "smbd", lp_hostsallow(NULL, lp_default_service(lp_ctx)), lp_hostsdeny(NULL, lp_default_service(lp_ctx)))) {
+ if (!socket_check_access(sock, "smbd", lpcfg_hostsallow(NULL, lpcfg_default_service(lp_ctx)), lpcfg_hostsdeny(NULL, lpcfg_default_service(lp_ctx)))) {
stream_terminate_connection(srv_conn, "denied by access rules");
return;
}
@@ -187,7 +187,7 @@ static void stream_new_connection(struct tevent_context *ev,
/* setup to receive internal messages on this connection */
srv_conn->msg_ctx = messaging_init(srv_conn,
- lp_messaging_path(srv_conn, lp_ctx),
+ lpcfg_messaging_path(srv_conn, lp_ctx),
srv_conn->server_id, ev);
if (!srv_conn->msg_ctx) {
stream_terminate_connection(srv_conn, "messaging_init() failed");
@@ -242,7 +242,7 @@ static void stream_accept_handler(struct tevent_context *ev, struct tevent_fd *f
/* ask the process model to create us a process for this new
connection. When done, it calls stream_new_connection()
with the newly created socket */
- stream_socket->model_ops->accept_connection(ev, stream_socket->lp_ctx,
+ stream_socket->model_ops->accept_connection(ev, stream_socket->lp_ctx,
stream_socket->sock,
stream_new_connection, stream_socket);
}
diff --git a/source4/smbd/service_task.c b/source4/smbd/service_task.c
index 55f2fa24b8..f9d15b8bc3 100644
--- a/source4/smbd/service_task.c
+++ b/source4/smbd/service_task.c
@@ -79,7 +79,7 @@ static void task_server_callback(struct tevent_context *event_ctx,
task->lp_ctx = lp_ctx;
task->msg_ctx = messaging_init(task,
- lp_messaging_path(task, task->lp_ctx),
+ lpcfg_messaging_path(task, task->lp_ctx),
task->server_id,
task->event_ctx);
if (!task->msg_ctx) {