From 291ddf433685ee5c25e172885045a4b60d7bb1ee Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Mon, 3 Dec 2007 00:28:07 +0100 Subject: r26237: Add loadparm context to the server service interface. (This used to be commit 1386c5c92505a950c65411b8af74d703ce023f95) --- source4/cldap_server/cldap_server.c | 2 +- source4/dsdb/repl/drepl_service.c | 2 +- source4/kdc/kdc.c | 1 + source4/ldap_server/ldap_server.c | 1 + source4/nbt_server/nbt_server.c | 2 +- source4/rpc_server/service_rpc.c | 1 + source4/smb_server/smb_server.c | 1 + source4/smbd/server.c | 2 +- source4/smbd/service.c | 10 ++++++---- source4/web_server/web_server.c | 1 + source4/winbind/wb_server.c | 1 + source4/wrepl_server/wrepl_server.c | 4 ++-- 12 files changed, 18 insertions(+), 10 deletions(-) diff --git a/source4/cldap_server/cldap_server.c b/source4/cldap_server/cldap_server.c index b43137c8df..477526a1f2 100644 --- a/source4/cldap_server/cldap_server.c +++ b/source4/cldap_server/cldap_server.c @@ -201,7 +201,7 @@ static void cldapd_task_init(struct task_server *task) /* initialise the cldapd server */ -static NTSTATUS cldapd_init(struct event_context *event_ctx, const struct model_ops *model_ops) +static NTSTATUS cldapd_init(struct event_context *event_ctx, struct loadparm_context *lp_ctx, const struct model_ops *model_ops) { return task_server_startup(event_ctx, model_ops, cldapd_task_init); } diff --git a/source4/dsdb/repl/drepl_service.c b/source4/dsdb/repl/drepl_service.c index 72033f4177..96db445f3d 100644 --- a/source4/dsdb/repl/drepl_service.c +++ b/source4/dsdb/repl/drepl_service.c @@ -182,7 +182,7 @@ static void dreplsrv_task_init(struct task_server *task) /* initialise the dsdb replicator service */ -static NTSTATUS dreplsrv_init(struct event_context *event_ctx, const struct model_ops *model_ops) +static NTSTATUS dreplsrv_init(struct event_context *event_ctx, struct loadparm_context *lp_ctx, const struct model_ops *model_ops) { return task_server_startup(event_ctx, model_ops, dreplsrv_task_init); } diff --git a/source4/kdc/kdc.c b/source4/kdc/kdc.c index 6c1f20bf13..da19d3be26 100644 --- a/source4/kdc/kdc.c +++ b/source4/kdc/kdc.c @@ -650,6 +650,7 @@ static void kdc_task_init(struct task_server *task) called on startup of the KDC service */ static NTSTATUS kdc_init(struct event_context *event_ctx, + struct loadparm_context *lp_ctx, const struct model_ops *model_ops) { return task_server_startup(event_ctx, model_ops, kdc_task_init); diff --git a/source4/ldap_server/ldap_server.c b/source4/ldap_server/ldap_server.c index 30afe7c590..51dba26dca 100644 --- a/source4/ldap_server/ldap_server.c +++ b/source4/ldap_server/ldap_server.c @@ -581,6 +581,7 @@ failed: listening on all configured sockets */ static NTSTATUS ldapsrv_init(struct event_context *event_context, + struct loadparm_context *lp_ctx, const struct model_ops *model_ops) { return task_server_startup(event_context, model_ops, ldapsrv_task_init); diff --git a/source4/nbt_server/nbt_server.c b/source4/nbt_server/nbt_server.c index 173cea91d0..6e669f1930 100644 --- a/source4/nbt_server/nbt_server.c +++ b/source4/nbt_server/nbt_server.c @@ -89,7 +89,7 @@ static void nbtd_task_init(struct task_server *task) /* initialise the nbt server */ -static NTSTATUS nbtd_init(struct event_context *event_ctx, const struct model_ops *model_ops) +static NTSTATUS nbtd_init(struct event_context *event_ctx, struct loadparm_context *lp_ctx, const struct model_ops *model_ops) { return task_server_startup(event_ctx, model_ops, nbtd_task_init); } diff --git a/source4/rpc_server/service_rpc.c b/source4/rpc_server/service_rpc.c index 04dd5a8ee9..b9cf4887fb 100644 --- a/source4/rpc_server/service_rpc.c +++ b/source4/rpc_server/service_rpc.c @@ -438,6 +438,7 @@ failed: listening on all configured sockets */ static NTSTATUS dcesrv_init(struct event_context *event_context, + struct loadparm_context *lp_ctx, const struct model_ops *model_ops) { return task_server_startup(event_context, model_ops, dcesrv_task_init); diff --git a/source4/smb_server/smb_server.c b/source4/smb_server/smb_server.c index 923c1bdfe5..ac5c589932 100644 --- a/source4/smb_server/smb_server.c +++ b/source4/smb_server/smb_server.c @@ -247,6 +247,7 @@ failed: listening on all configured sockets */ static NTSTATUS smbsrv_init(struct event_context *event_context, + struct loadparm_context *lp_ctx, const struct model_ops *model_ops) { return task_server_startup(event_context, model_ops, smbsrv_task_init); 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))); diff --git a/source4/web_server/web_server.c b/source4/web_server/web_server.c index 3926993334..be7b6aabdf 100644 --- a/source4/web_server/web_server.c +++ b/source4/web_server/web_server.c @@ -286,6 +286,7 @@ failed: listening on all configured sockets */ static NTSTATUS websrv_init(struct event_context *event_context, + struct loadparm_context *lp_ctx, const struct model_ops *model_ops) { return task_server_startup(event_context, model_ops, websrv_task_init); diff --git a/source4/winbind/wb_server.c b/source4/winbind/wb_server.c index 4225260774..6eb3d1513b 100644 --- a/source4/winbind/wb_server.c +++ b/source4/winbind/wb_server.c @@ -201,6 +201,7 @@ nomem: initialise the winbind server */ static NTSTATUS winbind_init(struct event_context *event_ctx, + struct loadparm_context *lp_ctx, const struct model_ops *model_ops) { return task_server_startup(event_ctx, model_ops, winbind_task_init); diff --git a/source4/wrepl_server/wrepl_server.c b/source4/wrepl_server/wrepl_server.c index a5c8007285..fbbd8e26d9 100644 --- a/source4/wrepl_server/wrepl_server.c +++ b/source4/wrepl_server/wrepl_server.c @@ -495,9 +495,9 @@ static void wreplsrv_task_init(struct task_server *task) /* initialise the WREPL server */ -static NTSTATUS wreplsrv_init(struct event_context *event_ctx, const struct model_ops *model_ops) +static NTSTATUS wreplsrv_init(struct event_context *event_ctx, struct loadparm_context *lp_ctx, const struct model_ops *model_ops) { - if (!lp_wins_support(global_loadparm)) { + if (!lp_wins_support(lp_ctx)) { return NT_STATUS_OK; } -- cgit