summaryrefslogtreecommitdiff
path: root/source4/dsdb/schema/schema_init.c
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2008-06-30 17:17:24 +0200
committerStefan Metzmacher <metze@samba.org>2008-07-01 17:58:47 +0200
commit2a918a353f3d0e5dc64ac89ad3e32a564aa094c9 (patch)
treecfbf2b30be864ebcf2bbd200e79a375ac1b74db0 /source4/dsdb/schema/schema_init.c
parentdb0a105aae2ba32be4aa5658fc8963ba28933a6b (diff)
downloadsamba-2a918a353f3d0e5dc64ac89ad3e32a564aa094c9.tar.gz
samba-2a918a353f3d0e5dc64ac89ad3e32a564aa094c9.tar.bz2
samba-2a918a353f3d0e5dc64ac89ad3e32a564aa094c9.zip
schema_fsmo: prepare auto allocation of schema oid prefixes
This implements the logic in the schema_fsmo_add() function, but it only calls a dummy dsdb_create_prefix_mapping() yet. metze (This used to be commit 9018b85e834de6714a78304ba1c7018838e30a61)
Diffstat (limited to 'source4/dsdb/schema/schema_init.c')
-rw-r--r--source4/dsdb/schema/schema_init.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/source4/dsdb/schema/schema_init.c b/source4/dsdb/schema/schema_init.c
index 6f8958dab8..9c70e9b7c8 100644
--- a/source4/dsdb/schema/schema_init.c
+++ b/source4/dsdb/schema/schema_init.c
@@ -334,6 +334,29 @@ WERROR dsdb_map_int2oid(const struct dsdb_schema *schema, uint32_t in, TALLOC_CT
return WERR_DS_NO_MSDS_INTID;
}
+/*
+ * this function is called from within a ldb transaction from the schema_fsmo module
+ */
+WERROR dsdb_create_prefix_mapping(struct ldb_context *ldb, struct dsdb_schema *schema, const char *full_oid)
+{
+ /*
+ * TODO:
+ * - (maybe) read the old prefixMap attribute and parse it
+ *
+ * - recheck the prefix doesn't exist (because the ldb
+ * has maybe a more uptodate value than schem->prefixes
+ *
+ * - calculate a new mapping for the oid prefix of full_oid
+ * - store the new prefixMap attribute
+ *
+ * - (maybe) update schema->prefixes
+ * or
+ * - better find a way to indicate a schema reload,
+ * so that other processes also notice the schema change
+ */
+ return WERR_NOT_SUPPORTED;
+}
+
#define GET_STRING_LDB(msg, attr, mem_ctx, p, elem, strict) do { \
(p)->elem = samdb_result_string(msg, attr, NULL);\
if (strict && (p)->elem == NULL) { \