diff options
author | Andrew Bartlett <abartlet@samba.org> | 2011-07-21 14:27:00 +1000 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2011-08-03 18:48:02 +1000 |
commit | 6bcaba6f8ab8bae874c67389e716dd3766309656 (patch) | |
tree | 34d58290bd9dd72d24faf902576b60eea6b47b0c /source3/auth | |
parent | a942401c1f6ee614080cee76c4364afbd729a446 (diff) | |
download | samba-6bcaba6f8ab8bae874c67389e716dd3766309656.tar.gz samba-6bcaba6f8ab8bae874c67389e716dd3766309656.tar.bz2 samba-6bcaba6f8ab8bae874c67389e716dd3766309656.zip |
s3-auth Allow auth modules to provide an initialised GENSEC context
This will allow auth plugins such as auth_samba4 to provide an initialised
GENSEC context to auth subsystem callers.
Andrew Bartlett
Signed-off-by: Andrew Tridgell <tridge@samba.org>
Diffstat (limited to 'source3/auth')
-rw-r--r-- | source3/auth/auth.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/source3/auth/auth.c b/source3/auth/auth.c index a7fe1c624c..df93e0d27a 100644 --- a/source3/auth/auth.c +++ b/source3/auth/auth.c @@ -438,7 +438,7 @@ static NTSTATUS make_auth_context_text_list(TALLOC_CTX *mem_ctx, char **text_list) { auth_methods *list = NULL; - auth_methods *t = NULL; + auth_methods *t, *method = NULL; NTSTATUS nt_status; if (!text_list) { @@ -460,7 +460,14 @@ static NTSTATUS make_auth_context_text_list(TALLOC_CTX *mem_ctx, (*auth_context)->auth_method_list = list; - return nt_status; + /* Look for the first module to provide a start_gensec hook, and set that if provided */ + for (method = (*auth_context)->auth_method_list; method; method = method->next) { + if (method->start_gensec) { + (*auth_context)->start_gensec = method->start_gensec; + break; + } + } + return NT_STATUS_OK; } /*************************************************************************** |