summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
Diffstat (limited to 'source4')
-rw-r--r--source4/dsdb/repl/drepl_notify.c12
-rw-r--r--source4/dsdb/repl/drepl_service.c2
-rw-r--r--source4/torture/rpc/drsuapi.c11
3 files changed, 16 insertions, 9 deletions
diff --git a/source4/dsdb/repl/drepl_notify.c b/source4/dsdb/repl/drepl_notify.c
index dd4c554447..eecb4442c7 100644
--- a/source4/dsdb/repl/drepl_notify.c
+++ b/source4/dsdb/repl/drepl_notify.c
@@ -105,17 +105,21 @@ static void dreplsrv_op_notify_replica_sync_trigger(struct tevent_req *req)
if (tevent_req_nomem(r, req)) {
return;
}
+ r->in.req = talloc_zero(r, union drsuapi_DsReplicaSyncRequest);
+ if (tevent_req_nomem(r, req)) {
+ return;
+ }
r->in.bind_handle = &drsuapi->bind_handle;
r->in.level = 1;
- r->in.req.req1.naming_context = &partition->nc;
- r->in.req.req1.source_dsa_guid = state->op->service->ntds_guid;
- r->in.req.req1.options =
+ r->in.req->req1.naming_context = &partition->nc;
+ r->in.req->req1.source_dsa_guid = state->op->service->ntds_guid;
+ r->in.req->req1.options =
DRSUAPI_DRS_ASYNC_OP |
DRSUAPI_DRS_UPDATE_NOTIFICATION |
DRSUAPI_DRS_WRIT_REP;
if (state->op->is_urgent) {
- r->in.req.req1.options |= DRSUAPI_DRS_SYNC_URGENT;
+ r->in.req->req1.options |= DRSUAPI_DRS_SYNC_URGENT;
}
rreq = dcerpc_drsuapi_DsReplicaSync_send(drsuapi->pipe, r, r);
diff --git a/source4/dsdb/repl/drepl_service.c b/source4/dsdb/repl/drepl_service.c
index 28d4334627..3ed588566f 100644
--- a/source4/dsdb/repl/drepl_service.c
+++ b/source4/dsdb/repl/drepl_service.c
@@ -110,7 +110,7 @@ static NTSTATUS drepl_replica_sync(struct irpc_message *msg,
{
struct dreplsrv_service *service = talloc_get_type(msg->private_data,
struct dreplsrv_service);
- struct GUID *guid = &r->in.req.req1.naming_context->guid;
+ struct GUID *guid = &r->in.req->req1.naming_context->guid;
r->out.result = dreplsrv_schedule_partition_pull_by_guid(service, msg, guid);
if (W_ERROR_IS_OK(r->out.result)) {
diff --git a/source4/torture/rpc/drsuapi.c b/source4/torture/rpc/drsuapi.c
index c8c8967199..24083bbe45 100644
--- a/source4/torture/rpc/drsuapi.c
+++ b/source4/torture/rpc/drsuapi.c
@@ -397,6 +397,7 @@ static bool test_DsReplicaSync(struct torture_context *tctx,
struct dcerpc_pipe *p = priv->drs_pipe;
int i;
struct drsuapi_DsReplicaSync r;
+ union drsuapi_DsReplicaSyncRequest sync_req;
struct drsuapi_DsReplicaObjectIdentifier nc;
struct GUID null_guid;
struct dom_sid null_sid;
@@ -434,10 +435,12 @@ static bool test_DsReplicaSync(struct torture_context *tctx,
nc.sid = null_sid;
nc.dn = priv->domain_obj_dn?priv->domain_obj_dn:"";
- r.in.req.req1.naming_context = &nc;
- r.in.req.req1.source_dsa_guid = priv->dcinfo.ntds_guid;
- r.in.req.req1.source_dsa_dns = NULL;
- r.in.req.req1.options = 16;
+ sync_req.req1.naming_context = &nc;
+ sync_req.req1.source_dsa_guid = priv->dcinfo.ntds_guid;
+ sync_req.req1.source_dsa_dns = NULL;
+ sync_req.req1.options = 16;
+
+ r.in.req = &sync_req;
break;
}