mirror of
https://github.com/samba-team/samba.git
synced 2025-02-02 09:47:23 +03:00
python: glue function for detecting if selftest is enabled
Signed-off-by: David Mulder <dmulder@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
parent
e5a32d4a01
commit
d01a588c20
@ -256,6 +256,16 @@ static PyObject *py_is_ad_dc_built(PyObject *self,
|
||||
#endif
|
||||
}
|
||||
|
||||
static PyObject *py_is_selftest_enabled(PyObject *self,
|
||||
PyObject *Py_UNUSED(ignored))
|
||||
{
|
||||
#ifdef ENABLE_SELFTEST
|
||||
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
|
||||
@ -448,6 +458,8 @@ static PyMethodDef py_misc_methods[] = {
|
||||
"Generate random bytes with specified length." },
|
||||
{ "is_ad_dc_built", (PyCFunction)py_is_ad_dc_built, METH_NOARGS,
|
||||
"is Samba built with AD DC?" },
|
||||
{ "is_selftest_enabled", (PyCFunction)py_is_selftest_enabled,
|
||||
METH_NOARGS, "is Samba built with selftest enabled?" },
|
||||
{0}
|
||||
};
|
||||
|
||||
|
@ -382,6 +382,7 @@ 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
|
||||
is_selftest_enabled = _glue.is_selftest_enabled
|
||||
|
||||
NTSTATUSError = _glue.NTSTATUSError
|
||||
HRESULTError = _glue.HRESULTError
|
||||
|
Loading…
x
Reference in New Issue
Block a user