diff options
author | Stefan Metzmacher <metze@samba.org> | 2012-08-01 08:54:51 +0200 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2012-08-01 14:17:12 +0200 |
commit | c9eac1af1462aa09dd20cdccda5807edaefb5cb7 (patch) | |
tree | b49f22f7a800b0a95651dab405595dbc45b136f1 /source3/libsmb | |
parent | 7af537e66f0e73ee629b3457ee78a11101f4e1c9 (diff) | |
download | samba-c9eac1af1462aa09dd20cdccda5807edaefb5cb7.tar.gz samba-c9eac1af1462aa09dd20cdccda5807edaefb5cb7.tar.bz2 samba-c9eac1af1462aa09dd20cdccda5807edaefb5cb7.zip |
s3:libsmb: make use of smb1cli_session_set_session_key()
metze
Diffstat (limited to 'source3/libsmb')
-rw-r--r-- | source3/libsmb/cliconnect.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/source3/libsmb/cliconnect.c b/source3/libsmb/cliconnect.c index 17b5af679f..ea7ddfef73 100644 --- a/source3/libsmb/cliconnect.c +++ b/source3/libsmb/cliconnect.c @@ -1092,8 +1092,16 @@ static void cli_session_setup_nt1_done(struct tevent_req *subreq) return; } if (state->session_key.data) { + struct smbXcli_session *session = state->cli->smb1.session; + /* Have plaintext orginal */ cli_set_session_key(cli, state->session_key); + + status = smb1cli_session_set_session_key(session, + state->session_key); + if (tevent_req_nterror(req, status)) { + return; + } } tevent_req_done(req); } @@ -1528,6 +1536,14 @@ static void cli_session_setup_kerberos_done(struct tevent_req *subreq) return; } } else { + struct smbXcli_session *session = state->cli->smb1.session; + + status = smb1cli_session_set_session_key(session, + state->session_key_krb5); + if (tevent_req_nterror(req, status)) { + return; + } + if (smb1cli_conn_activate_signing(state->cli->conn, state->session_key_krb5, data_blob_null) && !smb1cli_conn_check_signing(state->cli->conn, inbuf, 1)) { @@ -1739,6 +1755,14 @@ static void cli_session_setup_ntlmssp_done(struct tevent_req *subreq) return; } } else { + struct smbXcli_session *session = state->cli->smb1.session; + + status = smb1cli_session_set_session_key(session, + state->ntlmssp_state->session_key); + if (tevent_req_nterror(req, status)) { + return; + } + if (smb1cli_conn_activate_signing( state->cli->conn, state->ntlmssp_state->session_key, data_blob_null) |