summaryrefslogtreecommitdiff
path: root/auth
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2012-01-11 19:00:34 +1100
committerStefan Metzmacher <metze@samba.org>2012-01-11 09:15:42 +0100
commit5c92e9a46f46c0967fbec40826d5392ec86c3d6f (patch)
tree8540615671f838424d4afc83b52fa3c8835074c5 /auth
parent98ba33b2583185ae66f7eaa86b74bf3d0fcc99ff (diff)
downloadsamba-5c92e9a46f46c0967fbec40826d5392ec86c3d6f.tar.gz
samba-5c92e9a46f46c0967fbec40826d5392ec86c3d6f.tar.bz2
samba-5c92e9a46f46c0967fbec40826d5392ec86c3d6f.zip
gensec: Make sure to check the optional auth_context hooks before using them
These are optional to supply - some callers only provide an auth_context for the other plugin functions, and so we need to deal with this cleanly. Andrew Bartlett Signed-off-by: Stefan Metzmacher <metze@samba.org>
Diffstat (limited to 'auth')
-rw-r--r--auth/gensec/gensec_util.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/auth/gensec/gensec_util.c b/auth/gensec/gensec_util.c
index 44da345438..1b4c0b1a3e 100644
--- a/auth/gensec/gensec_util.c
+++ b/auth/gensec/gensec_util.c
@@ -41,7 +41,7 @@ NTSTATUS gensec_generate_session_info(TALLOC_CTX *mem_ctx,
session_info_flags |= AUTH_SESSION_INFO_AUTHENTICATED;
}
- if (gensec_security->auth_context) {
+ if (gensec_security->auth_context && gensec_security->auth_context->generate_session_info) {
nt_status = gensec_security->auth_context->generate_session_info(mem_ctx, gensec_security->auth_context,
user_info_dc,
session_info_flags,