summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2012-12-07 11:02:49 +0100
committerKarolin Seeger <kseeger@samba.org>2012-12-11 09:05:08 +0100
commit630bde0aba42bb5f181b7ebda305ed6794e6052d (patch)
treec1197da55dd4afec04a7b5511eb8eef49914622d
parent0da785a14b9966b42a9415b905881f5511ba9032 (diff)
downloadsamba-630bde0aba42bb5f181b7ebda305ed6794e6052d.tar.gz
s4:dsdb/acl_read: keep the ldb_message of the sub search (bug #9470)
Some modules might not allocate values on the correct memory context. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org> (cherry picked from commit 14b5b729049d92c30ba518adb82c9396fdddd09f)
-rw-r--r--source4/dsdb/samdb/ldb_modules/acl_read.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/source4/dsdb/samdb/ldb_modules/acl_read.c b/source4/dsdb/samdb/ldb_modules/acl_read.c
index 92744f28ba7..0b0f3636609 100644
--- a/source4/dsdb/samdb/ldb_modules/acl_read.c
+++ b/source4/dsdb/samdb/ldb_modules/acl_read.c
@@ -245,6 +245,11 @@ static int aclread_callback(struct ldb_request *req, struct ldb_reply *ares)
k++;
}
}
+ /*
+ * This should not be needed, but some modules
+ * may allocate values on the wrong context...
+ */
+ talloc_steal(ret_msg->elements, msg);
} else {
ret_msg->elements = NULL;
}