summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
Diffstat (limited to 'source4')
-rw-r--r--source4/auth/pyauth.c19
-rw-r--r--source4/auth/session.h7
-rw-r--r--source4/auth/system_session.c31
-rw-r--r--source4/auth/tests/bindings.py2
-rwxr-xr-xsource4/dsdb/tests/python/acl.py3
5 files changed, 4 insertions, 58 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()
diff --git a/source4/dsdb/tests/python/acl.py b/source4/dsdb/tests/python/acl.py
index a8cba74fe0..3897a60c37 100755
--- a/source4/dsdb/tests/python/acl.py
+++ b/source4/dsdb/tests/python/acl.py
@@ -25,7 +25,6 @@ from samba.ndr import ndr_pack, ndr_unpack
from samba.dcerpc import security
from samba.auth import system_session
-from samba.auth import system_session_anonymous
from samba import gensec
from samba.samdb import SamDB
from samba.credentials import Credentials
@@ -717,7 +716,7 @@ class AclSearchTests(AclTests):
self.u2 = "search_u2"
self.u3 = "search_u3"
self.group1 = "group1"
- self.anonymous = SamDB(url=host, session_info=system_session_anonymous(),
+ self.anonymous = SamDB(url=host, session_info=system_session(),
lp=lp)
res = self.ldb_admin.search("CN=Directory Service, CN=Windows NT, CN=Services, "
+ self.configuration_dn, scope=SCOPE_BASE, attrs=["dSHeuristics"])