static WERROR dreplsrv_init_creds(struct dreplsrv_service *service)
{
- NTSTATUS status;
-
- status = auth_system_session_info(service, service->task->lp_ctx,
- &service->system_session_info);
- if (!NT_STATUS_IS_OK(status)) {
- return ntstatus_to_werror(status);
+ service->system_session_info = system_session(service->task->lp_ctx);
+ if (service->system_session_info == NULL) {
+ return WERR_NOMEM;
}
return WERR_OK;
bind_info28->supported_extensions |= DRSUAPI_SUPPORTED_EXTENSION_TRANSITIVE_MEMBERSHIP;
bind_info28->supported_extensions |= DRSUAPI_SUPPORTED_EXTENSION_ADD_SID_HISTORY;
bind_info28->supported_extensions |= DRSUAPI_SUPPORTED_EXTENSION_POST_BETA3;
- bind_info28->supported_extensions |= DRSUAPI_SUPPORTED_EXTENSION_00100000;
+ bind_info28->supported_extensions |= DRSUAPI_SUPPORTED_EXTENSION_GETCHGREQ_V5;
bind_info28->supported_extensions |= DRSUAPI_SUPPORTED_EXTENSION_GET_MEMBERSHIPS2;
bind_info28->supported_extensions |= DRSUAPI_SUPPORTED_EXTENSION_GETCHGREQ_V6;
bind_info28->supported_extensions |= DRSUAPI_SUPPORTED_EXTENSION_NONDOMAIN_NCS;
{
struct dreplsrv_service *service = talloc_get_type(msg->private_data,
struct dreplsrv_service);
- WERROR werr;
- struct GUID *guid = &r->in.req.req1.naming_context->guid;
+ struct GUID *guid = &r->in.req->req1.naming_context->guid;
- werr = dreplsrv_schedule_partition_pull_by_guid(service, msg, guid);
- if (W_ERROR_IS_OK(werr)) {
+ r->out.result = dreplsrv_schedule_partition_pull_by_guid(service, msg, guid);
+ if (W_ERROR_IS_OK(r->out.result)) {
DEBUG(3,("drepl_replica_sync: forcing sync of partition %s\n",
GUID_string(msg, guid)));
dreplsrv_run_pending_ops(service);
} else {
DEBUG(3,("drepl_replica_sync: failed setup of sync of partition %s - %s\n",
- GUID_string(msg, guid), win_errstr(werr)));
- return NT_STATUS_INTERNAL_ERROR;
+ GUID_string(msg, guid), win_errstr(r->out.result)));
}
return NT_STATUS_OK;
}
switch (lp_server_role(task->lp_ctx)) {
case ROLE_STANDALONE:
- task_server_terminate(task, "dreplsrv: no DSDB replication required in standalone configuration");
+ task_server_terminate(task, "dreplsrv: no DSDB replication required in standalone configuration",
+ false);
return;
case ROLE_DOMAIN_MEMBER:
- task_server_terminate(task, "dreplsrv: no DSDB replication required in domain member configuration");
+ task_server_terminate(task, "dreplsrv: no DSDB replication required in domain member configuration",
+ false);
return;
case ROLE_DOMAIN_CONTROLLER:
/* Yes, we want DSDB replication */
service = talloc_zero(task, struct dreplsrv_service);
if (!service) {
- task_server_terminate(task, "dreplsrv_task_init: out of memory");
+ task_server_terminate(task, "dreplsrv_task_init: out of memory", true);
return;
}
service->task = task;
if (!W_ERROR_IS_OK(status)) {
task_server_terminate(task, talloc_asprintf(task,
"dreplsrv: Failed to obtain server credentials: %s\n",
- win_errstr(status)));
+ win_errstr(status)), true);
return;
}
if (!W_ERROR_IS_OK(status)) {
task_server_terminate(task, talloc_asprintf(task,
"dreplsrv: Failed to connect to local samdb: %s\n",
- win_errstr(status)));
+ win_errstr(status)), true);
return;
}
if (!W_ERROR_IS_OK(status)) {
task_server_terminate(task, talloc_asprintf(task,
"dreplsrv: Failed to load partitions: %s\n",
- win_errstr(status)));
+ win_errstr(status)), true);
return;
}
if (!W_ERROR_IS_OK(status)) {
task_server_terminate(task, talloc_asprintf(task,
"dreplsrv: Failed to periodic schedule: %s\n",
- win_errstr(status)));
+ win_errstr(status)), true);
return;
}
if (!W_ERROR_IS_OK(status)) {
task_server_terminate(task, talloc_asprintf(task,
"dreplsrv: Failed to setup notify schedule: %s\n",
- win_errstr(status)));
+ win_errstr(status)), true);
return;
}
irpc_add_name(task->msg_ctx, "dreplsrv");
IRPC_REGISTER(task->msg_ctx, drsuapi, DRSUAPI_DSREPLICASYNC, drepl_replica_sync, service);
+ messaging_register(task->msg_ctx, service, MSG_DREPL_ALLOCATE_RID, dreplsrv_allocate_rid);
}
/*