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

py3: Add is_ad_dc_built option to python glue

Signed-off-by: David Mulder <dmulder@suse.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
David Mulder 2020-09-18 11:27:24 -06:00 committed by Andrew Bartlett
parent 8f66ce0a3d
commit 895c729ce3
2 changed files with 13 additions and 0 deletions

View File

@ -203,6 +203,16 @@ static PyObject *py_is_heimdal_built(PyObject *self,
#endif
}
static PyObject *py_is_ad_dc_built(PyObject *self,
PyObject *Py_UNUSED(ignored))
{
#ifdef AD_DC_BUILD_IS_ENABLED
Py_RETURN_TRUE;
#else
Py_RETURN_FALSE;
#endif
}
/*
return the list of interface IPs we have configured
takes an loadparm context, returns a list of IPs in string form
@ -389,6 +399,8 @@ static PyMethodDef py_misc_methods[] = {
METH_VARARGS,
"generate_random_bytes(len) -> bytes\n"
"Generate random bytes with specified length." },
{ "is_ad_dc_built", (PyCFunction)py_is_ad_dc_built, METH_NOARGS,
"is Samba built with AD DC?" },
{0}
};

View File

@ -379,6 +379,7 @@ strcasecmp_m = _glue.strcasecmp_m
strstr_m = _glue.strstr_m
is_ntvfs_fileserver_built = _glue.is_ntvfs_fileserver_built
is_heimdal_built = _glue.is_heimdal_built
is_ad_dc_built = _glue.is_ad_dc_built
NTSTATUSError = _glue.NTSTATUSError
HRESULTError = _glue.HRESULTError