summaryrefslogtreecommitdiff
path: root/source4/dsdb/schema
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2011-08-09 12:55:57 +1000
committerAndrew Bartlett <abartlet@samba.org>2011-08-09 11:56:23 +0200
commitb206a365eade7fbd2defddbadf14ca293409ede3 (patch)
tree4383aa2dfecc4179832b8a8f13548615c99626ab /source4/dsdb/schema
parentdee678a7be373bbe6497e60d9283dae4ca4793ec (diff)
downloadsamba-b206a365eade7fbd2defddbadf14ca293409ede3.tar.gz
samba-b206a365eade7fbd2defddbadf14ca293409ede3.tar.bz2
samba-b206a365eade7fbd2defddbadf14ca293409ede3.zip
move schema_fill_constructed() call to dsdb_setup_sorted_accessors()
Diffstat (limited to 'source4/dsdb/schema')
-rw-r--r--source4/dsdb/schema/schema_set.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/source4/dsdb/schema/schema_set.c b/source4/dsdb/schema/schema_set.c
index 53bfa72ff3..8cb06bb70e 100644
--- a/source4/dsdb/schema/schema_set.c
+++ b/source4/dsdb/schema/schema_set.c
@@ -321,6 +321,7 @@ int dsdb_setup_sorted_accessors(struct ldb_context *ldb,
struct dsdb_attribute *a;
unsigned int i;
unsigned int num_int_id;
+ int ret;
/* free all caches */
dsdb_sorted_accessors_free(schema);
@@ -405,6 +406,12 @@ int dsdb_setup_sorted_accessors(struct ldb_context *ldb,
dsdb_setup_attribute_shortcuts(ldb, schema);
+ ret = schema_fill_constructed(schema);
+ if (ret != LDB_SUCCESS) {
+ dsdb_sorted_accessors_free(schema);
+ return ret;
+ }
+
return LDB_SUCCESS;
failed:
@@ -426,11 +433,6 @@ int dsdb_set_schema(struct ldb_context *ldb, struct dsdb_schema *schema)
return ret;
}
- ret = schema_fill_constructed(schema);
- if (ret != LDB_SUCCESS) {
- return ret;
- }
-
old_schema = ldb_get_opaque(ldb, "dsdb_schema");
ret = ldb_set_opaque(ldb, "dsdb_schema", schema);