summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2009-12-29 16:10:57 +0100
committerStefan Metzmacher <metze@samba.org>2009-12-29 17:06:25 +0100
commitf31d144e70c632892ffc7d5177789947e821ad7e (patch)
tree085643a2da496a3c69513c72aedbd55e72d0bd3b /source4
parent994d34b949cd68b692ca688f162652c924732e84 (diff)
downloadsamba-f31d144e70c632892ffc7d5177789947e821ad7e.tar.gz
samba-f31d144e70c632892ffc7d5177789947e821ad7e.tar.bz2
samba-f31d144e70c632892ffc7d5177789947e821ad7e.zip
s4:ntlmssp_server: always call ntlmssp_server_postauth() and decide there if it's a noop
metze
Diffstat (limited to 'source4')
-rw-r--r--source4/auth/ntlmssp/ntlmssp_server.c16
1 files changed, 11 insertions, 5 deletions
diff --git a/source4/auth/ntlmssp/ntlmssp_server.c b/source4/auth/ntlmssp/ntlmssp_server.c
index 559cca0733..b456337806 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;
}
/**