summaryrefslogtreecommitdiff
path: root/source4/dsdb/schema/schema_init.c
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2014-05-23 16:06:17 +1200
committerAndrew Bartlett <abartlet@samba.org>2014-06-11 10:18:26 +0200
commit8327321225251e312ccbd06bbefa5ebf98099f34 (patch)
treecd82c2bc1634f10dbf8bd85abfddd9738359dab9 /source4/dsdb/schema/schema_init.c
parentcda32d4e47aa3efb040eb60f1a0332ea8dd58417 (diff)
downloadsamba-8327321225251e312ccbd06bbefa5ebf98099f34.tar.gz
dsdb: Do not store a struct ldb_dn in struct schema_data
The issue is that the DN contains a pointer to the ldb it belongs to, and if this is not kept around long enough, we might reference memory after it is de-allocated. Andrew Bartlett Change-Id: I040a6c37a3164b3309f370e32e598dd56b1a1bbb Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
Diffstat (limited to 'source4/dsdb/schema/schema_init.c')
-rw-r--r--source4/dsdb/schema/schema_init.c8
1 files changed, 0 insertions, 8 deletions
diff --git a/source4/dsdb/schema/schema_init.c b/source4/dsdb/schema/schema_init.c
index efbd38a4ba3..43a6a89b3c3 100644
--- a/source4/dsdb/schema/schema_init.c
+++ b/source4/dsdb/schema/schema_init.c
@@ -58,12 +58,6 @@ struct dsdb_schema *dsdb_schema_copy_shallow(TALLOC_CTX *mem_ctx,
return NULL;
}
- /* schema base_dn */
- schema_copy->base_dn = ldb_dn_copy(schema_copy, schema->base_dn);
- if (!schema_copy->base_dn) {
- goto failed;
- }
-
/* copy prexiMap & schemaInfo */
schema_copy->prefixmap = dsdb_schema_pfm_copy_shallow(schema_copy,
schema->prefixmap);
@@ -931,8 +925,6 @@ int dsdb_schema_from_ldb_results(TALLOC_CTX *mem_ctx, struct ldb_context *ldb,
false);
}
- schema->base_dn = talloc_steal(schema, schema_res->msgs[0]->dn);
-
prefix_val = ldb_msg_find_ldb_val(schema_res->msgs[0], "prefixMap");
if (!prefix_val) {
*error_string = talloc_asprintf(mem_ctx,