/*
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);
}
/*
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);
}
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);
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);
/*
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);
}
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);
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);
}
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;
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);
*/
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;
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;
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)));
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);
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);
/*
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;
}