1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-24 13:57:43 +03:00

pyldb: Fix deleting an ldb.Control critical flag

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>
This commit is contained in:
Joseph Sutton 2021-09-25 11:16:09 +12:00 committed by Andrew Bartlett
parent b1adaa517c
commit 9d25a21d60
2 changed files with 4 additions and 1 deletions

View File

@ -182,6 +182,10 @@ static PyObject *py_ldb_control_get_critical(PyLdbControlObject *self,
static int py_ldb_control_set_critical(PyLdbControlObject *self, PyObject *value, void *closure)
{
if (value == NULL) {
PyErr_SetString(PyExc_AttributeError, "cannot delete critical flag");
return -1;
}
if (PyObject_IsTrue(value)) {
self->data->critical = true;
} else {

View File

@ -1,4 +1,3 @@
samba.tests.segfault.samba.tests.segfault.SegfaultTests.test_net_replicate_init__3
samba.tests.segfault.samba.tests.segfault.SegfaultTests.test_dnsp_string_list
samba.tests.segfault.samba.tests.segfault.SegfaultTests.test_dns_record
samba.tests.segfault.samba.tests.segfault.SegfaultTests.test_ldb_control_del_critical