r20826: make the dsdb_control_current_partition struct public and allocate an oid...
authorStefan Metzmacher <metze@samba.org>
Tue, 16 Jan 2007 10:57:55 +0000 (10:57 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 19:43:37 +0000 (14:43 -0500)
control

metze
(This used to be commit 684eee52e8812f6d104d8706ab059643ff4faa46)

source4/dsdb/samdb/ldb_modules/partition.c
source4/dsdb/samdb/samdb.h
source4/setup/schema_samba4.ldif

index c05fc215dcf55f1dec3dcdccde3ec0dd941533d2..a7456c48f1d8942070716466c950589c4761a5d7 100644 (file)
 #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) {
index 2a974affbbbf64e4552429272cef086e2af98eb8..17059b7ec5742ff9ef7f478ecdf9dd9c9fe20fb3 100644 (file)
@@ -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;
index cf991414ba6f0b941916661274eed0b7b9dfe102..841604318a7e22dc7ccdc66defe241ff420dcffc 100644 (file)
@@ -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