From ece6eae4d8862a564c581a3f3808c04edab6cb19 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Wed, 22 Dec 2010 17:17:07 +1100 Subject: 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 --- source4/auth/session.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'source4/auth/session.h') 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); -- cgit