s4/drs: Propagate drsuapi_DsReplicaSync changes in source base
authorKamen Mazdrashki <kamen.mazdrashki@postpath.com>
Sat, 13 Feb 2010 02:57:28 +0000 (04:57 +0200)
committerAnatoliy Atanasov <anatoliy.atanasov@postpath.com>
Wed, 24 Feb 2010 12:14:07 +0000 (14:14 +0200)
source4/dsdb/repl/drepl_notify.c
source4/dsdb/repl/drepl_service.c
source4/torture/rpc/drsuapi.c

index dd4c5544474be54f9f86f5db895ac1ef50e1b273..eecb4442c77241906c9188ea04ccfb85724f9ad1 100644 (file)
@@ -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);
index 28d4334627485af02422fdb0ed2ce28fd277ef08..3ed588566fae37e16b337fb133ba56ec03fe8220 100644 (file)
@@ -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)) {
index c8c8967199f87c9862f6731571a801c892578f23..24083bbe45788188f474579040eade5fe5ec0386 100644 (file)
@@ -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;
                }