s4-drs: base is_nc_prefix on instanceType
authorAndrew Tridgell <tridge@samba.org>
Sat, 9 Jan 2010 07:50:30 +0000 (18:50 +1100)
committerAndrew Tridgell <tridge@samba.org>
Sat, 9 Jan 2010 07:56:30 +0000 (18:56 +1100)
for extended operations comparing to the ncRoot_dn is not correct

source4/rpc_server/drsuapi/getncchanges.c

index ad35de883305a260906f8ad0c62ae79949386577..908060a0dd51760975e2aacca28f2395a6f3b1ea 100644 (file)
@@ -102,8 +102,10 @@ static WERROR get_nc_changes_build_object(struct drsuapi_DsReplicaObjectListItem
        uint32_t *attids;
        const char *rdn;
        const struct dsdb_attribute *rdn_sa;
+       unsigned int instanceType;
 
-       if (ldb_dn_compare(ncRoot_dn, msg->dn) == 0) {
+       instanceType = ldb_msg_find_attr_as_uint(msg, "instanceType", 0);
+       if (instanceType & INSTANCE_TYPE_IS_NC_HEAD) {
                obj->is_nc_prefix = true;
                obj->parent_object_guid = NULL;
        } else {