s4/drs: parentGUID needs to be specififcally asked for
authorAndrew Tridgell <tridge@samba.org>
Thu, 10 Sep 2009 13:03:07 +0000 (23:03 +1000)
committerAndrew Tridgell <tridge@samba.org>
Fri, 11 Sep 2009 04:07:19 +0000 (14:07 +1000)
Right now parentGUID is a normal attribute in s4, but it should be
generated, which means we need to ask for it in a search if we want to
use it.

source4/rpc_server/drsuapi/getncchanges.c

index 2d06970b80ed7b633997e5dc0ce6c241045fb97e..3b908fffbcbaf9610411e83a4013cd3294d846cb 100644 (file)
@@ -169,6 +169,7 @@ WERROR dcesrv_drsuapi_DsGetNCChanges(struct dcesrv_call_state *dce_call, TALLOC_
        struct drsuapi_DsReplicaObjectListItemEx *currentObject;
        NTSTATUS status;
        DATA_BLOB session_key;
+       const char *attrs[] = { "*", "parentGUID", NULL };
 
        /*
         * connect to the samdb. TODO: We need to check that the caller
@@ -209,7 +210,7 @@ WERROR dcesrv_drsuapi_DsGetNCChanges(struct dcesrv_call_state *dce_call, TALLOC_
        /* Construct response. */
        ncRoot_dn = ldb_dn_new(mem_ctx, sam_ctx, ncRoot->dn);
        ret = drsuapi_search_with_extended_dn(sam_ctx, mem_ctx, &site_res,
-                        ncRoot_dn, LDB_SCOPE_SUBTREE, NULL,
+                                             ncRoot_dn, LDB_SCOPE_SUBTREE, attrs,
                                              "(&(uSNChanged>=%llu)(objectClass=*))", 
                                              (unsigned long long)r->in.req->req8.highwatermark.highest_usn);
        if (ret != LDB_SUCCESS) {