summaryrefslogtreecommitdiff
path: root/source4/scripting/python
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2008-12-21 03:37:31 +0100
committerJelmer Vernooij <jelmer@samba.org>2008-12-21 03:37:31 +0100
commitbfb29e94b1e9cbbbca4dcfbbad171ba10e09ce07 (patch)
tree2727d3ff8933035a1890b4936264884c9196586d /source4/scripting/python
parent2e7a6cb6bf32a49682ccadc07244d3a6ae4058d3 (diff)
downloadsamba-bfb29e94b1e9cbbbca4dcfbbad171ba10e09ce07.tar.gz
samba-bfb29e94b1e9cbbbca4dcfbbad171ba10e09ce07.tar.bz2
samba-bfb29e94b1e9cbbbca4dcfbbad171ba10e09ce07.zip
Convert auth python module to "plain" C rather than using SWIG.
Diffstat (limited to 'source4/scripting/python')
-rw-r--r--source4/scripting/python/config.mk2
-rw-r--r--source4/scripting/python/pyglue.c8
2 files changed, 8 insertions, 2 deletions
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);