s4:ntlmssp Always setup the session keys and signing state
authorAndrew Bartlett <abartlet@samba.org>
Fri, 6 Aug 2010 07:51:34 +0000 (17:51 +1000)
committerAndrew Bartlett <abartlet@samba.org>
Sat, 7 Aug 2010 08:39:47 +0000 (18:39 +1000)
While it would save some CPU to only setup the session key when
requested (like windows does), this instead matches the
implementation in source3/libsmb/ntlmssp.c

We could re-add this later after the codebase is merged.

Andrew Bartlett

source4/auth/ntlmssp/ntlmssp_server.c

index 9cfc18cd030aedf5fe76bc533ed411dd1c733670..ee5f69acd35c62d435ee32a418f64796f8d32f79 100644 (file)
@@ -412,11 +412,6 @@ 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);
 
@@ -525,11 +520,8 @@ static NTSTATUS ntlmssp_server_postauth(struct gensec_security *gensec_security,
                ntlmssp_state->session_key = session_key;
        }
 
-       if ((gensec_security->want_features & GENSEC_FEATURE_SIGN)
-           || (gensec_security->want_features & GENSEC_FEATURE_SEAL)) {
+       if (ntlmssp_state->session_key.length) {
                nt_status = ntlmssp_sign_init(ntlmssp_state);
-       } else {
-               nt_status = NT_STATUS_OK;
        }
 
        ntlmssp_state->expected_state = NTLMSSP_DONE;