diff options
author | Richard Sharpe <sharpe@samba.org> | 2002-09-03 21:35:26 +0000 |
---|---|---|
committer | Richard Sharpe <sharpe@samba.org> | 2002-09-03 21:35:26 +0000 |
commit | f04ca060c2f30f4b5c01867b8db117e00912750c (patch) | |
tree | cfe2e7a98b2787504794fa9c7ca37d90791ce279 /source3/libsmb | |
parent | fedc33df428411fb8a58c4e9d2d7d8fa0e9d2923 (diff) | |
download | samba-f04ca060c2f30f4b5c01867b8db117e00912750c.tar.gz samba-f04ca060c2f30f4b5c01867b8db117e00912750c.tar.bz2 samba-f04ca060c2f30f4b5c01867b8db117e00912750c.zip |
Fix the struct_blob.
(This used to be commit ce152b33c8b08905ea863d47a620c90ca47c8566)
Diffstat (limited to 'source3/libsmb')
-rw-r--r-- | source3/libsmb/cliconnect.c | 13 | ||||
-rw-r--r-- | source3/libsmb/clispnego.c | 1 |
2 files changed, 9 insertions, 5 deletions
diff --git a/source3/libsmb/cliconnect.c b/source3/libsmb/cliconnect.c index 885463bd34..1f3635d6d7 100644 --- a/source3/libsmb/cliconnect.c +++ b/source3/libsmb/cliconnect.c @@ -458,7 +458,7 @@ static BOOL cli_session_setup_ntlmssp(struct cli_state *cli, char *user, char *pass, char *workgroup) { DATA_BLOB msg1, struct_blob; - DATA_BLOB blob, chal1, chal2, auth; + DATA_BLOB blob, chal1, chal2, auth, challenge_blob; uint8 challenge[8]; uint8 nthash[24], lmhash[24], sess_key[16]; uint32 neg_flags, chal_flags, ntlmssp_command, unkn1, unkn2; @@ -516,9 +516,9 @@ static BOOL cli_session_setup_ntlmssp(struct cli_state *cli, char *user, &ntlmssp_command, &server_domain, &chal_flags, - challenge, 8, + &challenge_blob, 8, &unkn1, &unkn2, - struct_blob.data, &struct_blob.length)) { + &struct_blob)) { DEBUG(0, ("Failed to parse the NTLMSSP Challenge\n")); return False; } @@ -529,11 +529,14 @@ static BOOL cli_session_setup_ntlmssp(struct cli_state *cli, char *user, return False; } + DEBUG(10, ("Challenge:\n")); + dump_data(10, challenge_blob.data, 8); - /* encrypt the password with the challenge */ - memcpy(challenge, chal1.data + 24, 8); + /* encrypt the password with the challenge which is in the blob */ + memcpy(challenge, challenge_blob.data, 8); SMBencrypt(pass, challenge,lmhash); SMBNTencrypt(pass, challenge,nthash); + data_blob_free(&challenge_blob); #if 0 file_save("nthash.dat", nthash, 24); diff --git a/source3/libsmb/clispnego.c b/source3/libsmb/clispnego.c index 8aab0fdda9..04ec6ed39e 100644 --- a/source3/libsmb/clispnego.c +++ b/source3/libsmb/clispnego.c @@ -518,6 +518,7 @@ DATA_BLOB spnego_gen_auth_response(void) A = ASCII string (pointer + length) Actually same as B B = data blob (pointer + length) b = data blob in header (pointer + length) + D d = word (4 bytes) C = constant ascii string */ |