summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2004-01-05 00:11:02 +0000
committerAndrew Bartlett <abartlet@samba.org>2004-01-05 00:11:02 +0000
commite8984d6b9aac91082af745d22a4b195a1be5dee4 (patch)
treedfd9c0d48caf3caf30f10199734f5a0d6e0fc96b /source3
parent430f9abd5f1d2537eab17c7c51a9e9b09f415989 (diff)
downloadsamba-e8984d6b9aac91082af745d22a4b195a1be5dee4.tar.gz
samba-e8984d6b9aac91082af745d22a4b195a1be5dee4.tar.bz2
samba-e8984d6b9aac91082af745d22a4b195a1be5dee4.zip
Automaticly initialise the signing engine, if we have a session key.
(This used to be commit cb063c1b6949a2a9637689537c6ab8dc881bc568)
Diffstat (limited to 'source3')
-rw-r--r--source3/libsmb/ntlmssp.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/source3/libsmb/ntlmssp.c b/source3/libsmb/ntlmssp.c
index e58104367f..85ae279758 100644
--- a/source3/libsmb/ntlmssp.c
+++ b/source3/libsmb/ntlmssp.c
@@ -739,6 +739,12 @@ static NTSTATUS ntlmssp_server_auth(struct ntlmssp_state *ntlmssp_state,
ntlmssp_state->session_key = session_key;
}
+ if (!NT_STATUS_IS_OK(nt_status)) {
+ ntlmssp_state->session_key = data_blob(NULL, 0);
+ } else if (ntlmssp_state->session_key.length) {
+ nt_status = ntlmssp_sign_init(ntlmssp_state);
+ }
+
data_blob_free(&encrypted_session_key);
/* allow arbitarily many authentications */