summaryrefslogtreecommitdiff
path: root/source4/dsdb/samdb/ldb_modules/samldb.c
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2014-05-23 16:06:17 +1200
committerKarolin Seeger <kseeger@samba.org>2014-07-15 12:46:15 +0200
commitf72899ec2bc0ad3f6cd1e3d586235543b51f7cd1 (patch)
tree1a68b5d71b7db5f49ec832bf73ba46919e1d3c12 /source4/dsdb/samdb/ldb_modules/samldb.c
parent4730d74e38998aaeadbe13682cc6462c3ceb4766 (diff)
downloadsamba-f72899ec2bc0ad3f6cd1e3d586235543b51f7cd1.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> (cherry picked from commit 8327321225251e312ccbd06bbefa5ebf98099f34)
Diffstat (limited to 'source4/dsdb/samdb/ldb_modules/samldb.c')
-rw-r--r--source4/dsdb/samdb/ldb_modules/samldb.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/source4/dsdb/samdb/ldb_modules/samldb.c b/source4/dsdb/samdb/ldb_modules/samldb.c
index 91a9680741..ca553e615c 100644
--- a/source4/dsdb/samdb/ldb_modules/samldb.c
+++ b/source4/dsdb/samdb/ldb_modules/samldb.c
@@ -509,7 +509,8 @@ static int samldb_add_handle_msDS_IntId(struct samldb_ctx *ac)
continue;
}
- ret = dsdb_module_load_partition_usn(ac->module, schema->base_dn, &current_usn, NULL, NULL);
+ ret = dsdb_module_load_partition_usn(ac->module, schema_dn,
+ &current_usn, NULL, NULL);
if (ret != LDB_SUCCESS) {
ldb_debug_set(ldb, LDB_DEBUG_ERROR,
__location__": Searching for schema USN failed: %s\n",