diff options
author | Andrew Bartlett <abartlet@samba.org> | 2005-09-29 00:28:46 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:39:10 -0500 |
commit | f9fea8ba7786ef0b633d396c6ae56929325f312b (patch) | |
tree | b43b2a544abf940cf68757275b0f556c159ca6dd /source4/libcli/smb_composite | |
parent | 66af2d9e42264763fcb0680b510dfb59494b3b64 (diff) | |
download | samba-f9fea8ba7786ef0b633d396c6ae56929325f312b.tar.gz samba-f9fea8ba7786ef0b633d396c6ae56929325f312b.tar.bz2 samba-f9fea8ba7786ef0b633d396c6ae56929325f312b.zip |
r10598: Factor out common code, in preperation for a move elsewhere.
Andrew Bartlett
(This used to be commit 0d757b169a3d521a0d228bed51aa96cf199d5c42)
Diffstat (limited to 'source4/libcli/smb_composite')
-rw-r--r-- | source4/libcli/smb_composite/sesssetup.c | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/source4/libcli/smb_composite/sesssetup.c b/source4/libcli/smb_composite/sesssetup.c index 2ca862fb2f..700e4ef744 100644 --- a/source4/libcli/smb_composite/sesssetup.c +++ b/source4/libcli/smb_composite/sesssetup.c @@ -199,15 +199,10 @@ static NTSTATUS session_setup_nt1(struct composite_context *c, return NT_STATUS_NO_MEMORY; } data_blob_free(&names_blob); + data_blob_free(&lmv2_session_key); state->setup.nt1.in.password1 = lmv2_response; state->setup.nt1.in.password2 = ntlmv2_response; - smbcli_transport_simple_set_signing(session->transport, session_key, - state->setup.nt1.in.password2); - set_user_session_key(session, &session_key); - - data_blob_free(&lmv2_session_key); - data_blob_free(&session_key); } else { state->setup.nt1.in.password2 = nt_blob(state, nt_hash, @@ -222,13 +217,14 @@ static NTSTATUS session_setup_nt1(struct composite_context *c, session_key = data_blob_talloc(session, NULL, 16); SMBsesskeygen_ntv1(nt_hash->hash, session_key.data); - smbcli_transport_simple_set_signing(session->transport, session_key, - state->setup.nt1.in.password2); - set_user_session_key(session, &session_key); - - data_blob_free(&session_key); } + smbcli_transport_simple_set_signing(session->transport, session_key, + state->setup.nt1.in.password2); + set_user_session_key(session, &session_key); + + data_blob_free(&session_key); + } else if (lp_client_plaintext_auth()) { state->setup.nt1.in.password1 = data_blob_talloc(state, password, strlen(password)); state->setup.nt1.in.password2 = data_blob(NULL, 0); |