diff options
author | Stefan Metzmacher <metze@samba.org> | 2007-01-04 09:47:49 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 14:36:11 -0500 |
commit | 3b7686447a25d35cfdcf1f78c6eda0a85bac674f (patch) | |
tree | 40c4a384d251961cb0ee2de076cea7068905aa48 /source4/auth | |
parent | d0d846cd9bf1ea5439922ec2cedd445dc3195098 (diff) | |
download | samba-3b7686447a25d35cfdcf1f78c6eda0a85bac674f.tar.gz samba-3b7686447a25d35cfdcf1f78c6eda0a85bac674f.tar.bz2 samba-3b7686447a25d35cfdcf1f78c6eda0a85bac674f.zip |
r20520: allow the caller to pass NULL if it doesn't want a session info
this can be used when we start to support the FAST BIND LDAP Control
metze
(This used to be commit 0a73d3262d5deb5a9d0052751336413fbea370b1)
Diffstat (limited to 'source4/auth')
-rw-r--r-- | source4/auth/auth_simple.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/source4/auth/auth_simple.c b/source4/auth/auth_simple.c index a0bb636bb6..59e1280ee5 100644 --- a/source4/auth/auth_simple.c +++ b/source4/auth/auth_simple.c @@ -26,6 +26,10 @@ #include "auth/auth.h" #include "lib/events/events.h" +/* + It's allowed to pass NULL as session_info, + when the caller doesn't need a session_info +*/ _PUBLIC_ NTSTATUS authenticate_username_pw(TALLOC_CTX *mem_ctx, struct event_context *ev, struct messaging_context *msg, @@ -82,12 +86,15 @@ _PUBLIC_ NTSTATUS authenticate_username_pw(TALLOC_CTX *mem_ctx, return nt_status; } - nt_status = auth_generate_session_info(tmp_ctx, server_info, session_info); + if (session_info) { + nt_status = auth_generate_session_info(tmp_ctx, server_info, session_info); - if (NT_STATUS_IS_OK(nt_status)) { - talloc_steal(mem_ctx, *session_info); + if (NT_STATUS_IS_OK(nt_status)) { + talloc_steal(mem_ctx, *session_info); + } } + talloc_free(tmp_ctx); return nt_status; } |