diff options
author | Andrew Bartlett <abartlet@samba.org> | 2010-04-13 12:00:06 +1000 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2010-04-14 10:30:51 +1000 |
commit | 589a42e2da7d7cd382deb94c57b0c6dbca269e55 (patch) | |
tree | 843f90acec386e763b37a3dda77d986cb4ead6de /source4/auth/system_session.c | |
parent | 4e2384e2426745023553afb21270165872c61b02 (diff) | |
download | samba-589a42e2da7d7cd382deb94c57b0c6dbca269e55.tar.gz samba-589a42e2da7d7cd382deb94c57b0c6dbca269e55.tar.bz2 samba-589a42e2da7d7cd382deb94c57b0c6dbca269e55.zip |
s4:auth Change auth_generate_session_info to take an auth context
The auth context was in the past only for NTLM authentication, but we
need a SAM, an event context and and loadparm context for calculating
the local groups too, so re-use that infrustructure we already have in
place.
However, to avoid problems where we may not have an auth_context (in
torture tests, for example), allow a simpler 'session_info' to be
generated, by passing this via an indirection in gensec and an
generate_session_info() function pointer in the struct auth_context.
In the smb_server (for old-style session setups) we need to change the
async context to a new 'struct sesssetup_context'. This allows us to
use the auth_context in processing the authentication reply .
Andrew Bartlett
Diffstat (limited to 'source4/auth/system_session.c')
-rw-r--r-- | source4/auth/system_session.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/source4/auth/system_session.c b/source4/auth/system_session.c index 4df96884ca..c6df082f69 100644 --- a/source4/auth/system_session.c +++ b/source4/auth/system_session.c @@ -114,9 +114,9 @@ static NTSTATUS create_token(TALLOC_CTX *mem_ctx, return NT_STATUS_OK; } -static NTSTATUS generate_simple_session_info(TALLOC_CTX *mem_ctx, - struct auth_serversupplied_info *server_info, - struct auth_session_info **_session_info) +NTSTATUS auth_generate_simple_session_info(TALLOC_CTX *mem_ctx, + struct auth_serversupplied_info *server_info, + struct auth_session_info **_session_info) { struct auth_session_info *session_info; NTSTATUS nt_status; @@ -197,7 +197,7 @@ static NTSTATUS _auth_system_session_info(TALLOC_CTX *parent_ctx, } /* references the server_info into the session_info */ - nt_status = generate_simple_session_info(parent_ctx, server_info, &session_info); + nt_status = auth_generate_simple_session_info(parent_ctx, server_info, &session_info); talloc_free(mem_ctx); NT_STATUS_NOT_OK_RETURN(nt_status); @@ -528,7 +528,7 @@ _PUBLIC_ NTSTATUS auth_anonymous_session_info(TALLOC_CTX *parent_ctx, } /* references the server_info into the session_info */ - nt_status = generate_simple_session_info(parent_ctx, server_info, &session_info); + nt_status = auth_generate_simple_session_info(parent_ctx, server_info, &session_info); talloc_free(mem_ctx); NT_STATUS_NOT_OK_RETURN(nt_status); |