mirror of
https://github.com/samba-team/samba.git
synced 2024-12-23 17:34:34 +03:00
pyldb: Fix deleting an ldb.Message dn
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14845
Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
[abartlet@samba.org backported from commit d7af772de8
due to conflicts in knownfail.d/python-segfaults]
This commit is contained in:
parent
805183c816
commit
2bb74e48c7
@ -3741,6 +3741,10 @@ static PyObject *py_ldb_msg_get_dn(PyLdbMessageObject *self, void *closure)
|
||||
static int py_ldb_msg_set_dn(PyLdbMessageObject *self, PyObject *value, void *closure)
|
||||
{
|
||||
struct ldb_message *msg = pyldb_Message_AsMessage(self);
|
||||
if (value == NULL) {
|
||||
PyErr_SetString(PyExc_AttributeError, "cannot delete dn");
|
||||
return -1;
|
||||
}
|
||||
if (!pyldb_Dn_Check(value)) {
|
||||
PyErr_SetString(PyExc_TypeError, "expected dn");
|
||||
return -1;
|
||||
|
@ -1,2 +1,3 @@
|
||||
samba.tests.segfault.samba.tests.segfault.SegfaultTests.test_net_replicate_init__3
|
||||
samba.tests.segfault.samba.tests.segfault.SegfaultTests.test_ldb_msg_del_dn
|
||||
samba.tests.segfault.samba.tests.segfault.SegfaultTests.test_dnsp_string_list
|
||||
samba.tests.segfault.samba.tests.segfault.SegfaultTests.test_dns_record
|
||||
|
Loading…
Reference in New Issue
Block a user