s4-drs: Fix bug - prefixMap is not updated when adding new OIDs.
authorKamen Mazdrashki <kamen.mazdrashki@postpath.com>
Fri, 18 Dec 2009 01:53:13 +0000 (03:53 +0200)
committerAndrew Tridgell <tridge@samba.org>
Mon, 21 Dec 2009 12:43:51 +0000 (23:43 +1100)
The bug is that prefixMap is updated only memory when
adding new Classs/Attribute that has and OID not in
prefixMap already.

Signed-off-by: Andrew Tridgell <tridge@samba.org>
source4/dsdb/samdb/ldb_modules/schema_data.c

index ed10ae6d6998e99124314e3721920fe150b031b7..dfb322225ae98d45335be2f50ef33eae573b4aff 100644 (file)
@@ -140,7 +140,6 @@ static int schema_data_add(struct ldb_module *module, struct ldb_request *req)
        const struct ldb_val *governsID = NULL;
        const char *oid_attr = NULL;
        const char *oid = NULL;
-       uint32_t attid;
        WERROR status;
 
        ldb = ldb_module_get_ctx(module);
@@ -184,7 +183,7 @@ static int schema_data_add(struct ldb_module *module, struct ldb_request *req)
                return LDB_ERR_OPERATIONS_ERROR;
        }
                
-       status = dsdb_schema_pfm_make_attid(schema->prefixmap, oid, &attid);
+       status = dsdb_schema_pfm_find_oid(schema->prefixmap, oid, NULL);
        if (W_ERROR_IS_OK(status)) {
                return ldb_next_request(module, req);
        } else if (!W_ERROR_EQUAL(WERR_DS_NO_MSDS_INTID, status)) {