summaryrefslogtreecommitdiff
path: root/source4/dsdb
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2010-01-07 18:16:14 +1100
committerAndrew Tridgell <tridge@samba.org>2010-01-08 13:03:05 +1100
commita65823e33c8fab39ea6dde752662c527bcbf818b (patch)
tree87ab7ad754d28d17871a31f5cf0d6d6be32bf272 /source4/dsdb
parent308a4798b8b6acc7f74ce678a7c04f536a3e4737 (diff)
downloadsamba-a65823e33c8fab39ea6dde752662c527bcbf818b.tar.gz
samba-a65823e33c8fab39ea6dde752662c527bcbf818b.tar.bz2
samba-a65823e33c8fab39ea6dde752662c527bcbf818b.zip
s4-dsdb: ensure we will in all the attributes for RID Set
We need to go to the top of the module stack so that all the extra attributes get filled in
Diffstat (limited to 'source4/dsdb')
-rw-r--r--source4/dsdb/samdb/ldb_modules/ridalloc.c20
1 files changed, 4 insertions, 16 deletions
diff --git a/source4/dsdb/samdb/ldb_modules/ridalloc.c b/source4/dsdb/samdb/ldb_modules/ridalloc.c
index 2d0753f393..07b3739f8e 100644
--- a/source4/dsdb/samdb/ldb_modules/ridalloc.c
+++ b/source4/dsdb/samdb/ldb_modules/ridalloc.c
@@ -175,26 +175,11 @@ static int ridalloc_create_rid_set_ntds(struct ldb_module *module, TALLOC_CTX *m
msg = ldb_msg_new(tmp_ctx);
msg->dn = rid_set_dn;
- ret = ldb_msg_add_string(msg, "objectClass", "top");
- if (ret != LDB_SUCCESS) {
- talloc_free(tmp_ctx);
- return ret;
- }
ret = ldb_msg_add_string(msg, "objectClass", "rIDSet");
if (ret != LDB_SUCCESS) {
talloc_free(tmp_ctx);
return ret;
}
- ret = ldb_msg_add_string(msg, "cn", "RID Set");
- if (ret != LDB_SUCCESS) {
- talloc_free(tmp_ctx);
- return ret;
- }
- ret = ldb_msg_add_string(msg, "name", "RID Set");
- if (ret != LDB_SUCCESS) {
- talloc_free(tmp_ctx);
- return ret;
- }
ret = ldb_msg_add_fmt(msg, "rIDAllocationPool", "%llu", (unsigned long long)dc_pool);
if (ret != LDB_SUCCESS) {
talloc_free(tmp_ctx);
@@ -218,7 +203,10 @@ static int ridalloc_create_rid_set_ntds(struct ldb_module *module, TALLOC_CTX *m
return ret;
}
- ret = dsdb_module_add(module, msg, 0);
+ /* we need this to go all the way to the top of the module
+ * stack, as we need all the extra attributes added (including
+ * complex ones like ntsecuritydescriptor) */
+ ret = dsdb_module_add(module, msg, DSDB_FLAG_TOP_MODULE | DSDB_MODIFY_RELAX);
if (ret != LDB_SUCCESS) {
ldb_asprintf_errstring(ldb, "Failed to add RID Set %s - %s",
ldb_dn_get_linearized(msg->dn),