summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source4/dsdb/repl/drepl_service.c8
-rw-r--r--source4/rpc_server/drsuapi/dcesrv_drsuapi.c25
2 files changed, 7 insertions, 26 deletions
diff --git a/source4/dsdb/repl/drepl_service.c b/source4/dsdb/repl/drepl_service.c
index cb415b65e6..75ce42b91a 100644
--- a/source4/dsdb/repl/drepl_service.c
+++ b/source4/dsdb/repl/drepl_service.c
@@ -113,18 +113,16 @@ static NTSTATUS drepl_replica_sync(struct irpc_message *msg,
{
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;
- 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;
}
diff --git a/source4/rpc_server/drsuapi/dcesrv_drsuapi.c b/source4/rpc_server/drsuapi/dcesrv_drsuapi.c
index c01711d2d9..491b962a85 100644
--- a/source4/rpc_server/drsuapi/dcesrv_drsuapi.c
+++ b/source4/rpc_server/drsuapi/dcesrv_drsuapi.c
@@ -28,7 +28,6 @@
#include "lib/ldb/include/ldb_errors.h"
#include "param/param.h"
#include "librpc/gen_ndr/ndr_drsblobs.h"
-#include "messaging/irpc.h"
#include "rpc_server/drsuapi/dcesrv_drsuapi.h"
#include "libcli/security/security.h"
@@ -232,35 +231,19 @@ static WERROR dcesrv_drsuapi_DsUnbind(struct dcesrv_call_state *dce_call, TALLOC
static WERROR dcesrv_drsuapi_DsReplicaSync(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
struct drsuapi_DsReplicaSync *r)
{
- struct server_id *repld;
- struct irpc_request *ireq;
-
if (security_session_user_level(dce_call->conn->auth_state.session_info) <
SECURITY_DOMAIN_CONTROLLER) {
DEBUG(0,("DsReplicaSync refused for security token\n"));
return WERR_DS_DRA_ACCESS_DENIED;
}
- repld = irpc_servers_byname(dce_call->msg_ctx, mem_ctx, "dreplsrv");
- if (repld == NULL || repld[0].id == 0) {
- DEBUG(0,("DsReplicaSync: Unable to find dreplsrv task\n"));
- return WERR_DS_DRA_INTERNAL_ERROR;
- }
-
- ireq = IRPC_CALL_SEND(dce_call->msg_ctx, repld[0],
- drsuapi, DRSUAPI_DSREPLICASYNC,
- r, mem_ctx);
- if (ireq == NULL) {
- DEBUG(0,("DsReplicaSync: Failed to forward request to dreplsrv task\n"));
- return WERR_DS_DRA_INTERNAL_ERROR;
- }
-
- /* we are not interested in a reply */
- talloc_free(ireq);
-
+ dcesrv_irpc_forward_rpc_call(dce_call, mem_ctx, r, NDR_DRSUAPI_DSREPLICASYNC,
+ &ndr_table_drsuapi,
+ "dreplsrv", "DsReplicaSync");
return WERR_OK;
}
+
/*
drsuapi_DsReplicaAdd
*/