summaryrefslogtreecommitdiff
path: root/source4/auth/session.h
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2010-12-22 17:17:07 +1100
committerAndrew Tridgell <tridge@samba.org>2011-01-14 16:39:32 +1100
commitece6eae4d8862a564c581a3f3808c04edab6cb19 (patch)
tree5989f3b1f029595076106811ff5e7c4d55d4b18a /source4/auth/session.h
parentc82269cf862b00c987c02aefa78155c142f6d065 (diff)
downloadsamba-ece6eae4d8862a564c581a3f3808c04edab6cb19.tar.gz
samba-ece6eae4d8862a564c581a3f3808c04edab6cb19.tar.bz2
samba-ece6eae4d8862a564c581a3f3808c04edab6cb19.zip
s4-auth Add function to obtain any user's session_info from a given LDB
This will be a building block for a tokenGroups test, which can compare against a remote server (in particular the rootDSE) against what we would calculate the tokenGroups to be. (this meant moving some parts out of the auth_sam code into the containing library) Andrew Bartlett
Diffstat (limited to 'source4/auth/session.h')
-rw-r--r--source4/auth/session.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/source4/auth/session.h b/source4/auth/session.h
index 39c818fbf2..caedbc8028 100644
--- a/source4/auth/session.h
+++ b/source4/auth/session.h
@@ -30,7 +30,9 @@ struct auth_session_info {
#include "librpc/gen_ndr/netlogon.h"
+struct tevent_context;
struct ldb_context;
+struct ldb_dn;
/* Create a security token for a session SYSTEM (the most
* trusted/prvilaged account), including the local machine account as
* the off-host credentials */
@@ -48,6 +50,18 @@ NTSTATUS auth_generate_session_info(TALLOC_CTX *mem_ctx,
NTSTATUS auth_anonymous_session_info(TALLOC_CTX *parent_ctx,
struct loadparm_context *lp_ctx,
struct auth_session_info **_session_info);
+/* Produce a session_info for an arbitary DN or principal in the local
+ * DB, assuming the local DB holds all the groups
+ *
+ * Supply either a principal or a DN
+ */
+NTSTATUS authsam_get_session_info_principal(TALLOC_CTX *mem_ctx,
+ struct loadparm_context *lp_ctx,
+ struct ldb_context *sam_ctx,
+ const char *principal,
+ struct ldb_dn *user_dn,
+ uint32_t session_info_flags,
+ struct auth_session_info **session_info);
struct auth_session_info *anonymous_session(TALLOC_CTX *mem_ctx,
struct loadparm_context *lp_ctx);