s4-drs: switch the DRS server to the generic DRS options flags
authorAndrew Tridgell <tridge@samba.org>
Thu, 14 Jan 2010 03:38:00 +0000 (14:38 +1100)
committerAndrew Tridgell <tridge@samba.org>
Thu, 14 Jan 2010 04:37:59 +0000 (15:37 +1100)
source4/rpc_server/drsuapi/getncchanges.c
source4/rpc_server/drsuapi/updaterefs.c

index 908060a0dd51760975e2aacca28f2395a6f3b1ea..d9245b58f0c58cc82c4708e9dba45032ef8d8ac7 100644 (file)
@@ -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",
index b1e3d6c352ebb216fe863d37a032fd3306898e47..2c2a9728446b43f3711ddf54e0843f5d934fd71e 100644 (file)
@@ -48,7 +48,7 @@ static WERROR uref_add_dest(struct ldb_context *sam_ctx, TALLOC_CTX *mem_ctx,
        for (i=0; i<reps.count; i++) {
                if (GUID_compare(&dest->source_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;