summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2012-12-07 11:02:49 +0100
committerStefan Metzmacher <metze@samba.org>2012-12-07 14:28:25 +0100
commit14b5b729049d92c30ba518adb82c9396fdddd09f (patch)
treeb1d2bdb63b4c6d04b9900b8d90381e3ea9feebde /source4
parent3535f8effefef6a68d2b686abe2769d797531dd9 (diff)
downloadsamba-14b5b729049d92c30ba518adb82c9396fdddd09f.tar.gz
samba-14b5b729049d92c30ba518adb82c9396fdddd09f.tar.bz2
samba-14b5b729049d92c30ba518adb82c9396fdddd09f.zip
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>
Diffstat (limited to 'source4')
-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 92744f28ba..0b0f363660 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;
}