pydsdb: Fix returning of ldb.MessageElement.
authorAndrew Bartlett <abartlet@samba.org>
Tue, 16 Feb 2016 02:15:44 +0000 (15:15 +1300)
committerKarolin Seeger <kseeger@samba.org>
Thu, 21 Apr 2016 07:09:25 +0000 (09:09 +0200)
commitcb827b71562cedb60b9a4dd33fbd48d04f811460
treecd721a5ee83c2e3cb246568ee941fd46aadc61a9
parent513b5d776e2d51787405b377cddf6c16480807c9
pydsdb: Fix returning of ldb.MessageElement.

This object is not based on pytalloc_Object and so this causes
a segfault (later a failure) when the struct definitions diverge.
We must also not reuse the incoming ldb_message_element as a talloc
context and overwrite the values, instead we should create a new
object and return that.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
(cherry picked from commit b96b1e88f760c92c7d9bb7e732f72d7e73a68907)
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11789
source4/dsdb/pydsdb.c