1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-23 17:34:34 +03:00

samba-tool: Enable pydsdb without ad dc

Signed-off-by: David Mulder <dmulder@suse.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
David Mulder 2020-09-17 13:27:14 -06:00 committed by Andrew Bartlett
parent e5e39a836a
commit a7897cc6cd
2 changed files with 5 additions and 2 deletions

View 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" },

View 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'
)