r20957: a value of FF0000000000000000000000000000000000000000 isn't stored as schemaInfo
authorStefan Metzmacher <metze@samba.org>
Mon, 22 Jan 2007 19:07:57 +0000 (19:07 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 19:44:02 +0000 (14:44 -0500)
so we need to use it as value if nothing is stored

metze
(This used to be commit cd326134079375fc83640444d6323a5cbe7c02ee)

source4/dsdb/samdb/ldb_modules/schema_fsmo.c

index deba2b7d8888b57b69bba9692820529f2ce13832..231042fe66208749e2371521adec9c7192f1cfdd 100644 (file)
@@ -42,6 +42,7 @@ static int schema_fsmo_init(struct ldb_module *module)
        struct ldb_result *schema_res;
        const struct ldb_val *prefix_val;
        const struct ldb_val *info_val;
+       struct ldb_val info_val_default;
        struct ldb_result *a_res;
        struct ldb_result *c_res;
        uint32_t i;
@@ -116,10 +117,13 @@ static int schema_fsmo_init(struct ldb_module *module)
        }
        info_val = ldb_msg_find_ldb_val(schema_res->msgs[0], "schemaInfo");
        if (!info_val) {
-               ldb_debug_set(module->ldb, LDB_DEBUG_FATAL,
-                             "schema_fsmo_init: no schemaInfo attribute found\n");
-               talloc_free(mem_ctx);
-               return LDB_ERR_CONSTRAINT_VIOLATION;
+               info_val_default = strhex_to_data_blob("FF0000000000000000000000000000000000000000");
+               if (!info_val_default.data) {
+                       ldb_oom(module->ldb);
+                       return LDB_ERR_OPERATIONS_ERROR;
+               }
+               talloc_steal(mem_ctx, info_val_default.data);
+               info_val = &info_val_default;
        }
 
        status = dsdb_load_oid_mappings_ldb(schema, prefix_val, info_val);