From a7897cc6cd5ba2df57d354c71b625e98be2a3243 Mon Sep 17 00:00:00 2001 From: David Mulder Date: Thu, 17 Sep 2020 13:27:14 -0600 Subject: [PATCH] samba-tool: Enable pydsdb without ad dc Signed-off-by: David Mulder Reviewed-by: Andrew Bartlett --- source4/dsdb/pydsdb.c | 4 ++++ source4/dsdb/wscript_build | 3 +-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/source4/dsdb/pydsdb.c b/source4/dsdb/pydsdb.c index b68d76ada49..95b23d8adc3 100644 --- a/source4/dsdb/pydsdb.c +++ b/source4/dsdb/pydsdb.c @@ -1168,6 +1168,7 @@ static PyObject *py_dsdb_allocate_rid(PyObject *self, PyObject *args) return PyLong_FromLong(rid); } +#ifdef AD_DC_BUILD_IS_ENABLED static PyObject *py_dns_delete_tombstones(PyObject *self, PyObject *args) { PyObject *py_ldb; @@ -1333,6 +1334,7 @@ static PyObject *py_dsdb_garbage_collect_tombstones(PyObject *self, PyObject *ar return Py_BuildValue("(II)", num_objects_removed, num_links_removed); } +#endif static PyObject *py_dsdb_load_udv_v2(PyObject *self, PyObject *args) { @@ -1466,6 +1468,7 @@ static PyMethodDef py_dsdb_methods[] = { { "_dsdb_get_wellknown_dn", (PyCFunction)py_dsdb_get_wellknown_dn, METH_VARARGS, NULL }, { "_dsdb_DsReplicaAttribute", (PyCFunction)py_dsdb_DsReplicaAttribute, METH_VARARGS, NULL }, { "_dsdb_normalise_attributes", (PyCFunction)py_dsdb_normalise_attributes, METH_VARARGS, NULL }, +#ifdef AD_DC_BUILD_IS_ENABLED { "_dsdb_garbage_collect_tombstones", (PyCFunction)py_dsdb_garbage_collect_tombstones, METH_VARARGS, "_dsdb_kcc_check_deleted(samdb, [dn], current_time, tombstone_lifetime)" " -> (num_objects_expunged, num_links_expunged)" }, @@ -1473,6 +1476,7 @@ static PyMethodDef py_dsdb_methods[] = { METH_VARARGS, NULL}, { "_dns_delete_tombstones", (PyCFunction)py_dns_delete_tombstones, METH_VARARGS, NULL}, +#endif { "_dsdb_create_own_rid_set", (PyCFunction)py_dsdb_create_own_rid_set, METH_VARARGS, "_dsdb_create_own_rid_set(samdb)" " -> None" }, diff --git a/source4/dsdb/wscript_build b/source4/dsdb/wscript_build index dbe58859a14..0238ea2e2d7 100644 --- a/source4/dsdb/wscript_build +++ b/source4/dsdb/wscript_build @@ -79,6 +79,5 @@ bld.SAMBA_PYTHON('python_dsdb', # removes it so we end up with unresolved symbols. deps='samdb %s dcerpc com_err %s %s dsdb_garbage_collect_tombstones scavenge_dns_records' %\ (pyldb_util, pyrpc_util, pyparam_util), - realname='samba/dsdb.so', - enabled=bld.AD_DC_BUILD_IS_ENABLED() + realname='samba/dsdb.so' )