summaryrefslogtreecommitdiff
path: root/source4/librpc/rpc/dcerpc_ntlm.c
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2004-05-09 12:42:18 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:51:51 -0500
commitdce84ffd379012812170f68f7de8aab73123f0b3 (patch)
treec5f6973838572fd06c07d6771f5286bc2073b569 /source4/librpc/rpc/dcerpc_ntlm.c
parent55fa62be31c9027d84be0e4caad3ee59d78ca1b0 (diff)
downloadsamba-dce84ffd379012812170f68f7de8aab73123f0b3.tar.gz
samba-dce84ffd379012812170f68f7de8aab73123f0b3.tar.bz2
samba-dce84ffd379012812170f68f7de8aab73123f0b3.zip
r610: - Merge the Samba3 'ntlm_auth --diagnostics' testsuite to Samba4.
- This required using NETLOGON_NEG_AUTH2_FLAGS for the SetupCredentials2 negotiation flags, which is what Samba3 does, because otherwise the server uses different crypto. - This tests the returned session keys, which we decrypt. - Update the Samba4 notion of a 'session key' to be a DATA_BLOB in most places. - Fix session key code to return NT_STATUS_NO_SESSION_KEY if none is available. - Remove a useless argument to SMBsesskeygen_ntv1 - move netr_CredentialState from the .idl to the new credentials.h Andrew Bartlett (This used to be commit 44f8b5b53e6abd4de8a676f78d729988fadff320)
Diffstat (limited to 'source4/librpc/rpc/dcerpc_ntlm.c')
-rw-r--r--source4/librpc/rpc/dcerpc_ntlm.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/source4/librpc/rpc/dcerpc_ntlm.c b/source4/librpc/rpc/dcerpc_ntlm.c
index 194b1aa865..fa4232c94a 100644
--- a/source4/librpc/rpc/dcerpc_ntlm.c
+++ b/source4/librpc/rpc/dcerpc_ntlm.c
@@ -57,13 +57,13 @@ static NTSTATUS ntlm_sign_packet(struct dcerpc_security *dcerpc_security,
}
static NTSTATUS ntlm_session_key(struct dcerpc_security *dcerpc_security,
- uint8 session_key[16])
+ DATA_BLOB *session_key)
{
struct ntlmssp_state *ntlmssp_state = dcerpc_security->private;
- if (!ntlmssp_state || ntlmssp_state->session_key.length < 16) {
- return NT_STATUS_UNSUCCESSFUL;
+ if (!ntlmssp_state->session_key.data) {
+ return NT_STATUS_NO_USER_SESSION_KEY;
}
- memcpy(session_key, ntlmssp_state->session_key.data, 16);
+ *session_key = ntlmssp_state->session_key;
return NT_STATUS_OK;
}