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:
parent
8f66ce0a3d
commit
895c729ce3
@ -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}
|
||||
};
|
||||
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user