From bfb29e94b1e9cbbbca4dcfbbad171ba10e09ce07 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Sun, 21 Dec 2008 03:37:31 +0100 Subject: Convert auth python module to "plain" C rather than using SWIG. --- source4/scripting/python/config.mk | 2 +- source4/scripting/python/pyglue.c | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) (limited to 'source4/scripting/python') diff --git a/source4/scripting/python/config.mk b/source4/scripting/python/config.mk index 1f57294c59..71432042fc 100644 --- a/source4/scripting/python/config.mk +++ b/source4/scripting/python/config.mk @@ -17,7 +17,7 @@ python_uuid_OBJ_FILES = $(pyscriptsrcdir)/uuidmodule.o [PYTHON::python_glue] LIBRARY_REALNAME = samba/glue.$(SHLIBEXT) -PRIVATE_DEPENDENCIES = LIBNDR LIBLDB SAMDB CREDENTIALS swig_ldb python_dcerpc_misc python_dcerpc_security +PRIVATE_DEPENDENCIES = LIBNDR LIBLDB SAMDB CREDENTIALS swig_ldb python_dcerpc_misc python_dcerpc_security swig_auth python_glue_OBJ_FILES = $(pyscriptsrcdir)/pyglue.o diff --git a/source4/scripting/python/pyglue.c b/source4/scripting/python/pyglue.c index 381792b735..2d0af630c1 100644 --- a/source4/scripting/python/pyglue.c +++ b/source4/scripting/python/pyglue.c @@ -29,6 +29,7 @@ #include "libcli/util/pyerrors.h" #include "librpc/gen_ndr/py_misc.h" #include "librpc/gen_ndr/py_security.h" +#include "auth/pyauth.h" /* FIXME: These should be in a header file somewhere, once we finish moving * away from SWIG .. */ @@ -121,7 +122,12 @@ static PyObject *py_ldb_set_session_info(PyObject *self, PyObject *args) return NULL; PyErr_LDB_OR_RAISE(py_ldb, ldb); - /* FIXME: Magic py_session_info -> info */ + /*if (!PyAuthSession_Check(py_session_info)) { + PyErr_SetString(PyExc_TypeError, "Expected session info object"); + return NULL; + }*/ + + info = PyAuthSession_AsSession(py_session_info); ldb_set_opaque(ldb, "sessionInfo", info); -- cgit