From: Andrew Tridgell Date: Thu, 14 Jan 2010 03:38:00 +0000 (+1100) Subject: s4-drs: switch the DRS server to the generic DRS options flags X-Git-Tag: tdb-1.2.1~356 X-Git-Url: http://git.samba.org/samba.git/?p=nivanova%2Fsamba-autobuild%2F.git;a=commitdiff_plain;h=2008d24e91ce38ac928a71d0dc5147ecca0f2b24;ds=sidebyside s4-drs: switch the DRS server to the generic DRS options flags --- diff --git a/source4/rpc_server/drsuapi/getncchanges.c b/source4/rpc_server/drsuapi/getncchanges.c index 908060a0dd5..d9245b58f0c 100644 --- a/source4/rpc_server/drsuapi/getncchanges.c +++ b/source4/rpc_server/drsuapi/getncchanges.c @@ -1052,9 +1052,9 @@ WERROR dcesrv_drsuapi_DsGetNCChanges(struct dcesrv_call_state *dce_call, TALLOC_ return WERR_NOMEM; } ureq.dest_dsa_guid = req8->destination_dsa_guid; - ureq.options = DRSUAPI_DS_REPLICA_UPDATE_ADD_REFERENCE | - DRSUAPI_DS_REPLICA_UPDATE_ASYNCHRONOUS_OPERATION | - DRSUAPI_DS_REPLICA_UPDATE_GETCHG_CHECK; + ureq.options = DRSUAPI_DRS_ADD_REF | + DRSUAPI_DRS_ASYNC_OP | + DRSUAPI_DRS_GETCHG_CHECK; werr = drsuapi_UpdateRefs(b_state, mem_ctx, &ureq); if (!W_ERROR_IS_OK(werr)) { DEBUG(0,(__location__ ": Failed UpdateRefs in DsGetNCChanges - %s\n", diff --git a/source4/rpc_server/drsuapi/updaterefs.c b/source4/rpc_server/drsuapi/updaterefs.c index b1e3d6c352e..2c2a9728446 100644 --- a/source4/rpc_server/drsuapi/updaterefs.c +++ b/source4/rpc_server/drsuapi/updaterefs.c @@ -48,7 +48,7 @@ static WERROR uref_add_dest(struct ldb_context *sam_ctx, TALLOC_CTX *mem_ctx, for (i=0; isource_dsa_obj_guid, &reps.r[i].ctr.ctr1.source_dsa_obj_guid) == 0) { - if (options & DRSUAPI_DS_REPLICA_UPDATE_GETCHG_CHECK) { + if (options & DRSUAPI_DRS_GETCHG_CHECK) { return WERR_OK; } else { return WERR_DS_DRA_REF_ALREADY_EXISTS; @@ -106,8 +106,8 @@ static WERROR uref_del_dest(struct ldb_context *sam_ctx, TALLOC_CTX *mem_ctx, } if (!found && - !(options & DRSUAPI_DS_REPLICA_UPDATE_GETCHG_CHECK) && - !(options & DRSUAPI_DS_REPLICA_UPDATE_ADD_REFERENCE)) { + !(options & DRSUAPI_DRS_GETCHG_CHECK) && + !(options & DRSUAPI_DRS_ADD_REF)) { return WERR_DS_DRA_REF_NOT_FOUND; } @@ -138,7 +138,7 @@ WERROR drsuapi_UpdateRefs(struct drsuapi_bind_state *b_state, TALLOC_CTX *mem_ct return WERR_DS_DRA_INTERNAL_ERROR; } - if (req->options & DRSUAPI_DS_REPLICA_UPDATE_DELETE_REFERENCE) { + if (req->options & DRSUAPI_DRS_DEL_REF) { werr = uref_del_dest(b_state->sam_ctx, mem_ctx, dn, &req->dest_dsa_guid, req->options); if (!W_ERROR_IS_OK(werr)) { DEBUG(0,("Failed to delete repsTo for %s\n", @@ -147,7 +147,7 @@ WERROR drsuapi_UpdateRefs(struct drsuapi_bind_state *b_state, TALLOC_CTX *mem_ct } } - if (req->options & DRSUAPI_DS_REPLICA_UPDATE_ADD_REFERENCE) { + if (req->options & DRSUAPI_DRS_ADD_REF) { struct repsFromTo1 dest; struct repsFromTo1OtherInfo oi;