]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
samba-tool: Enable pydsdb without ad dc
authorDavid Mulder <dmulder@suse.com>
Thu, 17 Sep 2020 19:27:14 +0000 (13:27 -0600)
committerAndrew Bartlett <abartlet@samba.org>
Wed, 10 Mar 2021 21:43:34 +0000 (21:43 +0000)
Signed-off-by: David Mulder <dmulder@suse.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
source4/dsdb/pydsdb.c
source4/dsdb/wscript_build

index b68d76ada4952d2b3b4fb1b76ce705b4be24fa32..95b23d8adc306c548db63a55221c1333ab77bd86 100644 (file)
@@ -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" },
index dbe58859a14b5bdad3a0a0f38ab350e6a3bc3ef1..0238ea2e2d727d7f8d162197183e7ae3afd382e8 100644 (file)
@@ -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'
                  )