diff options
author | Andrew Bartlett <abartlet@samba.org> | 2010-08-14 17:45:57 +1000 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2010-08-18 09:50:44 +1000 |
commit | ba52834dd97d4c855ab98c2cbab1d6ed8d189de8 (patch) | |
tree | 013f7077722cf7cf3e3a4245fea817deb96f3451 /source4/auth | |
parent | a68a5592c5fc88fc7ba335cfbe375d687c8b8112 (diff) | |
download | samba-ba52834dd97d4c855ab98c2cbab1d6ed8d189de8.tar.gz samba-ba52834dd97d4c855ab98c2cbab1d6ed8d189de8.tar.bz2 samba-ba52834dd97d4c855ab98c2cbab1d6ed8d189de8.zip |
s4:auth Remove system_session_anon() from python bindings
Diffstat (limited to 'source4/auth')
-rw-r--r-- | source4/auth/pyauth.c | 19 | ||||
-rw-r--r-- | source4/auth/session.h | 7 | ||||
-rw-r--r-- | source4/auth/system_session.c | 31 | ||||
-rw-r--r-- | source4/auth/tests/bindings.py | 2 |
4 files changed, 3 insertions, 56 deletions
diff --git a/source4/auth/pyauth.c b/source4/auth/pyauth.c index ee4d511fba..dff696334c 100644 --- a/source4/auth/pyauth.c +++ b/source4/auth/pyauth.c @@ -56,24 +56,6 @@ static PyObject *py_system_session(PyObject *module, PyObject *args) } -static PyObject *py_system_session_anon(PyObject *module, PyObject *args) -{ - PyObject *py_lp_ctx = Py_None; - struct loadparm_context *lp_ctx; - struct auth_session_info *session; - - if (!PyArg_ParseTuple(args, "|O", &py_lp_ctx)) - return NULL; - - lp_ctx = lpcfg_from_py_object(NULL, py_lp_ctx); /* FIXME: leaks memory */ - if (lp_ctx == NULL) - return NULL; - - session = system_session_anon(NULL, lp_ctx); - - return PyAuthSession_FromSession(session); -} - static PyObject *py_admin_session(PyObject *module, PyObject *args) { PyObject *py_lp_ctx; @@ -96,7 +78,6 @@ static PyObject *py_admin_session(PyObject *module, PyObject *args) static PyMethodDef py_auth_methods[] = { { "system_session", (PyCFunction)py_system_session, METH_VARARGS, NULL }, - { "system_session_anonymous", (PyCFunction)py_system_session_anon, METH_VARARGS, NULL }, { "admin_session", (PyCFunction)py_admin_session, METH_VARARGS, NULL }, { NULL }, }; diff --git a/source4/auth/session.h b/source4/auth/session.h index 8e22cc0576..3de054aef1 100644 --- a/source4/auth/session.h +++ b/source4/auth/session.h @@ -37,13 +37,6 @@ struct auth_context; * the off-host credentials */ struct auth_session_info *system_session(struct loadparm_context *lp_ctx) ; -/* - * Create a system session, but with anonymous credentials (so we do - * not need to open secrets.ldb) - */ -struct auth_session_info *system_session_anon(TALLOC_CTX *mem_ctx, struct loadparm_context *lp_ctx); - - NTSTATUS auth_anonymous_server_info(TALLOC_CTX *mem_ctx, const char *netbios_name, struct auth_serversupplied_info **_server_info) ; diff --git a/source4/auth/system_session.c b/source4/auth/system_session.c index 00184c861a..d588090d60 100644 --- a/source4/auth/system_session.c +++ b/source4/auth/system_session.c @@ -173,9 +173,9 @@ _PUBLIC_ struct auth_session_info *system_session(struct loadparm_context *lp_ct return static_session; } -static NTSTATUS _auth_system_session_info(TALLOC_CTX *parent_ctx, - struct loadparm_context *lp_ctx, - struct auth_session_info **_session_info) +NTSTATUS auth_system_session_info(TALLOC_CTX *parent_ctx, + struct loadparm_context *lp_ctx, + struct auth_session_info **_session_info) { NTSTATUS nt_status; struct auth_serversupplied_info *server_info = NULL; @@ -208,31 +208,6 @@ static NTSTATUS _auth_system_session_info(TALLOC_CTX *parent_ctx, return NT_STATUS_OK; } -/* - Create a system session, but with anonymous credentials (so we do not need to open secrets.ldb) -*/ -_PUBLIC_ struct auth_session_info *system_session_anon(TALLOC_CTX *mem_ctx, struct loadparm_context *lp_ctx) -{ - NTSTATUS nt_status; - struct auth_session_info *session_info = NULL; - nt_status = _auth_system_session_info(mem_ctx, lp_ctx, &session_info); - if (!NT_STATUS_IS_OK(nt_status)) { - return NULL; - } - return session_info; -} - - - -_PUBLIC_ NTSTATUS auth_system_session_info(TALLOC_CTX *parent_ctx, - struct loadparm_context *lp_ctx, - struct auth_session_info **_session_info) -{ - return _auth_system_session_info(parent_ctx, - lp_ctx, - _session_info); -} - NTSTATUS auth_system_server_info(TALLOC_CTX *mem_ctx, const char *netbios_name, struct auth_serversupplied_info **_server_info) { diff --git a/source4/auth/tests/bindings.py b/source4/auth/tests/bindings.py index cadfdd0ef7..6ecfc2047f 100644 --- a/source4/auth/tests/bindings.py +++ b/source4/auth/tests/bindings.py @@ -31,5 +31,3 @@ class AuthTests(samba.tests.TestCase): def test_system_session(self): auth.system_session() - def test_system_session_anon(self): - auth.system_session_anonymous() |