From: Andreas Schneider Date: Tue, 4 Apr 2017 06:10:52 +0000 (+0200) Subject: python: Add py_is_heimdal_built() to pyglue X-Git-Tag: ldb-1.1.30~377 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=18917d28a90a6a15216ca05dab94553fa7faa448;p=thirdparty%2Fsamba.git python: Add py_is_heimdal_built() to pyglue Signed-off-by: Andreas Schneider Reviewed-by: Andrew Bartlet Reviewed-by: Jeremy Allison --- diff --git a/python/pyglue.c b/python/pyglue.c index 2bb6247fdeb..07cde49e16b 100644 --- a/python/pyglue.c +++ b/python/pyglue.c @@ -152,6 +152,15 @@ static PyObject *py_is_ntvfs_fileserver_built(PyObject *self) #endif } +static PyObject *py_is_heimdal_built(PyObject *self) +{ +#ifdef SAMBA4_USES_HEIMDAL + 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 @@ -307,6 +316,8 @@ static PyMethodDef py_misc_methods[] = { "(for testing) find one string in another with Samba's strstr_m()"}, { "is_ntvfs_fileserver_built", (PyCFunction)py_is_ntvfs_fileserver_built, METH_NOARGS, "is the NTVFS file server built in this installation?" }, + { "is_heimdal_built", (PyCFunction)py_is_heimdal_built, METH_NOARGS, + "is Samba built with Heimdal Kerberbos?" }, { NULL } };