summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source4/dsdb/samdb/ldb_modules/partition.c6
-rw-r--r--source4/dsdb/samdb/samdb.h17
-rw-r--r--source4/setup/schema_samba4.ldif2
3 files changed, 20 insertions, 5 deletions
diff --git a/source4/dsdb/samdb/ldb_modules/partition.c b/source4/dsdb/samdb/ldb_modules/partition.c
index c05fc215dc..a7456c48f1 100644
--- a/source4/dsdb/samdb/ldb_modules/partition.c
+++ b/source4/dsdb/samdb/ldb_modules/partition.c
@@ -38,11 +38,6 @@
#include "ldb/include/includes.h"
#include "dsdb/samdb/samdb.h"
-struct dsdb_control_current_partition {
- struct ldb_module *module;
- const char *backend;
- struct ldb_dn *dn;
-};
struct partition_private_data {
struct dsdb_control_current_partition **partitions;
struct ldb_dn **replicate;
@@ -697,6 +692,7 @@ static int partition_init(struct ldb_module *module)
talloc_free(mem_ctx);
return LDB_ERR_OPERATIONS_ERROR;
}
+ data->partitions[i]->version = DSDB_CONTROL_CURRENT_PARTITION_VERSION;
data->partitions[i]->dn = ldb_dn_new(data->partitions[i], module->ldb, base);
if (!data->partitions[i]->dn) {
diff --git a/source4/dsdb/samdb/samdb.h b/source4/dsdb/samdb/samdb.h
index 2a974affbb..17059b7ec5 100644
--- a/source4/dsdb/samdb/samdb.h
+++ b/source4/dsdb/samdb/samdb.h
@@ -24,6 +24,7 @@
#define __SAMDB_H__
struct auth_session_info;
+struct dsdb_control_current_partition;
struct dsdb_extended_replicated_object;
struct dsdb_extended_replicated_objects;
@@ -35,6 +36,22 @@ struct dsdb_extended_replicated_objects;
#include "dsdb/schema/schema.h"
#include "dsdb/samdb/samdb_proto.h"
+#define DSDB_CONTROL_CURRENT_PARTITION_OID "1.3.6.1.4.1.7165.4.3.2"
+struct dsdb_control_current_partition {
+ /*
+ * this is the version of the dsdb_control_current_partition
+ * version 0: initial implementation
+ */
+#define DSDB_CONTROL_CURRENT_PARTITION_VERSION 0
+ uint32_t version;
+
+ struct ldb_dn *dn;
+
+ const char *backend;
+
+ struct ldb_module *module;
+};
+
#define DSDB_EXTENDED_REPLICATED_OBJECTS_OID "1.3.6.1.4.1.7165.4.4.1"
struct dsdb_extended_replicated_object {
struct ldb_message *msg;
diff --git a/source4/setup/schema_samba4.ldif b/source4/setup/schema_samba4.ldif
index cf991414ba..841604318a 100644
--- a/source4/setup/schema_samba4.ldif
+++ b/source4/setup/schema_samba4.ldif
@@ -149,6 +149,8 @@ oMSyntax: 4
#Allocated: (not used anymore) DSDB_CONTROL_REPLICATED_OBJECT_OID 1.3.6.1.4.1.7165.4.3.1
+#Allocated: DSDB_CONTROL_CURRENT_PARTITION_OID 1.3.6.1.4.1.7165.4.3.2
+
#Allocated: DSDB_EXTENDED_REPLICATED_OBJECTS_OID 1.3.6.1.4.1.7165.4.4.1
#Allocated: (middleName) attributeID: 1.3.6.1.4.1.7165.4.255.1