s4-drs: A quick fix for DRSUAPI_EXOP_FSMO_RID_ALLOC extended_op handling
authorKamen Mazdrashki <kamenim@samba.org>
Fri, 3 Sep 2010 03:20:49 +0000 (06:20 +0300)
committerKamen Mazdrashki <kamenim@samba.org>
Fri, 3 Sep 2010 10:23:48 +0000 (13:23 +0300)
When DRSUAPI_EXOP_FSMO_RID_ALLOC extended op is handled
in DsGetNCChanges() stub, we need to returned a well know set of
object - see: [ms-adts], 3.1.1.5.1.7

With this hack we are going to return just objects modified
during RID allocation procedure - i.e. "RID Manager$", "RID Set" for
computer object and computer object itself.

Which is a close approximation of what we are expected to return.

source4/rpc_server/drsuapi/getncchanges.c

index 262559592da62646680d0ff65ca4d576d4998b79..2659cf31818bb78a27e3bf772519339a22b94b73 100644 (file)
@@ -652,6 +652,15 @@ static WERROR getncchanges_rid_alloc(struct drsuapi_bind_state *b_state,
                return WERR_DS_DRA_INTERNAL_ERROR;
        }
 
+       /*
+        * FIXME (kim): this is a temp hack to return just few object,
+        * but not the whole domain NC.
+        * We should remove this hack and implement a 'scope'
+        * building function to return just the set of object
+        * documented for DRSUAPI_EXOP_FSMO_RID_ALLOC extended_op
+        */
+       ldb_sequence_number(ldb, LDB_SEQ_HIGHEST_SEQ, &req8->highwatermark.highest_usn);
+
        ret = ldb_extended(ldb, DSDB_EXTENDED_ALLOCATE_RID_POOL, exop, &ext_res);
        if (ret != LDB_SUCCESS) {
                DEBUG(0,(__location__ ": Failed extended allocation RID pool operation - %s\n",