diff options
author | Stefan Metzmacher <metze@samba.org> | 2009-12-29 16:10:57 +0100 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2009-12-29 17:06:25 +0100 |
commit | f31d144e70c632892ffc7d5177789947e821ad7e (patch) | |
tree | 085643a2da496a3c69513c72aedbd55e72d0bd3b /source4/auth/ntlmssp | |
parent | 994d34b949cd68b692ca688f162652c924732e84 (diff) | |
download | samba-f31d144e70c632892ffc7d5177789947e821ad7e.tar.gz |
s4:ntlmssp_server: always call ntlmssp_server_postauth() and decide there if it's a noop
metze
Diffstat (limited to 'source4/auth/ntlmssp')
-rw-r--r-- | source4/auth/ntlmssp/ntlmssp_server.c | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/source4/auth/ntlmssp/ntlmssp_server.c b/source4/auth/ntlmssp/ntlmssp_server.c index 559cca07339..b4563378065 100644 --- a/source4/auth/ntlmssp/ntlmssp_server.c +++ b/source4/auth/ntlmssp/ntlmssp_server.c @@ -402,6 +402,11 @@ static NTSTATUS ntlmssp_server_postauth(struct gensec_security *gensec_security, NTSTATUS nt_status; DATA_BLOB session_key = data_blob(NULL, 0); + if (!(gensec_security->want_features + & (GENSEC_FEATURE_SIGN|GENSEC_FEATURE_SEAL|GENSEC_FEATURE_SESSION_KEY))) { + return NT_STATUS_OK; + } + if (user_session_key) dump_data_pw("USER session key:\n", user_session_key->data, user_session_key->length); @@ -572,13 +577,14 @@ NTSTATUS ntlmssp_server_auth(struct gensec_security *gensec_security, return nt_status; } - if (gensec_security->want_features - & (GENSEC_FEATURE_SIGN|GENSEC_FEATURE_SEAL|GENSEC_FEATURE_SESSION_KEY)) { - nt_status = ntlmssp_server_postauth(gensec_security, &user_session_key, &lm_session_key); + nt_status = ntlmssp_server_postauth(gensec_security, + &user_session_key, + &lm_session_key); + if (!NT_STATUS_IS_OK(nt_status)) { return nt_status; - } else { - return NT_STATUS_OK; } + + return NT_STATUS_OK; } /** |