summaryrefslogtreecommitdiff
path: root/source4/smbd
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2007-12-03 00:28:07 +0100
committerStefan Metzmacher <metze@samba.org>2007-12-21 05:47:15 +0100
commit291ddf433685ee5c25e172885045a4b60d7bb1ee (patch)
tree49799dd1f97905f107642115ccb5e15cac8b375c /source4/smbd
parent6c999cd12344f2bb8b1d2941210b4c205b3e0aad (diff)
downloadsamba-291ddf433685ee5c25e172885045a4b60d7bb1ee.tar.gz
samba-291ddf433685ee5c25e172885045a4b60d7bb1ee.tar.bz2
samba-291ddf433685ee5c25e172885045a4b60d7bb1ee.zip
r26237: Add loadparm context to the server service interface.
(This used to be commit 1386c5c92505a950c65411b8af74d703ce023f95)
Diffstat (limited to 'source4/smbd')
-rw-r--r--source4/smbd/server.c2
-rw-r--r--source4/smbd/service.c10
2 files changed, 7 insertions, 5 deletions
diff --git a/source4/smbd/server.c b/source4/smbd/server.c
index 65196618db..87bab39bd1 100644
--- a/source4/smbd/server.c
+++ b/source4/smbd/server.c
@@ -334,7 +334,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, model, lp_server_services(global_loadparm));
+ status = server_service_startup(event_ctx, global_loadparm, model, lp_server_services(global_loadparm));
if (!NT_STATUS_IS_OK(status)) {
DEBUG(0,("Starting Services failed - %s\n", nt_errstr(status)));
return 1;
diff --git a/source4/smbd/service.c b/source4/smbd/service.c
index c9ceef09fe..525b245616 100644
--- a/source4/smbd/service.c
+++ b/source4/smbd/service.c
@@ -30,14 +30,14 @@
static struct registered_server {
struct registered_server *next, *prev;
const char *service_name;
- NTSTATUS (*service_init)(struct event_context *, const struct model_ops *);
+ NTSTATUS (*service_init)(struct event_context *, struct loadparm_context *lp_ctx, const struct model_ops *);
} *registered_servers;
/*
register a server service.
*/
NTSTATUS register_server_service(const char *name,
- NTSTATUS (*service_init)(struct event_context *, const struct model_ops *))
+ NTSTATUS (*service_init)(struct event_context *, struct loadparm_context *lp_ctx, const struct model_ops *))
{
struct registered_server *srv;
srv = talloc(talloc_autofree_context(), struct registered_server);
@@ -54,12 +54,13 @@ NTSTATUS register_server_service(const char *name,
*/
static NTSTATUS server_service_init(const char *name,
struct event_context *event_ctx,
+ struct loadparm_context *lp_ctx,
const struct model_ops *model_ops)
{
struct registered_server *srv;
for (srv=registered_servers; srv; srv=srv->next) {
if (strcasecmp(name, srv->service_name) == 0) {
- return srv->service_init(event_ctx, model_ops);
+ return srv->service_init(event_ctx, lp_ctx, model_ops);
}
}
return NT_STATUS_INVALID_SYSTEM_SERVICE;
@@ -70,6 +71,7 @@ static NTSTATUS server_service_init(const char *name,
startup all of our server services
*/
NTSTATUS server_service_startup(struct event_context *event_ctx,
+ struct loadparm_context *lp_ctx,
const char *model, const char **server_services)
{
int i;
@@ -89,7 +91,7 @@ NTSTATUS server_service_startup(struct event_context *event_ctx,
for (i=0;server_services[i];i++) {
NTSTATUS status;
- status = server_service_init(server_services[i], event_ctx, model_ops);
+ status = server_service_init(server_services[i], event_ctx, lp_ctx, model_ops);
if (!NT_STATUS_IS_OK(status)) {
DEBUG(0,("Failed to start service '%s' - %s\n",
server_services[i], nt_errstr(status)));