summaryrefslogtreecommitdiff
path: root/source3/libsmb
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2011-09-13 18:45:36 +0200
committerStefan Metzmacher <metze@samba.org>2011-09-15 12:12:25 +0200
commitdcf54977d705c2e0c06741a2c3618f663d3a0fcd (patch)
treebf91a120598c21997e14f08145b095cc699e9f6b /source3/libsmb
parentabca5f17c38f5ced2d03d66f99f91f895bf00851 (diff)
downloadsamba-dcf54977d705c2e0c06741a2c3618f663d3a0fcd.tar.gz
samba-dcf54977d705c2e0c06741a2c3618f663d3a0fcd.tar.bz2
samba-dcf54977d705c2e0c06741a2c3618f663d3a0fcd.zip
s3:libsmb: move cli->sesskey to cli->conn.smb1.server.session_key
metze
Diffstat (limited to 'source3/libsmb')
-rw-r--r--source3/libsmb/cliconnect.c7
-rw-r--r--source3/libsmb/clientgen.c2
2 files changed, 6 insertions, 3 deletions
diff --git a/source3/libsmb/cliconnect.c b/source3/libsmb/cliconnect.c
index 91e613affb..545a02bef6 100644
--- a/source3/libsmb/cliconnect.c
+++ b/source3/libsmb/cliconnect.c
@@ -2617,6 +2617,7 @@ static void cli_negprot_done(struct tevent_req *subreq)
uint32_t max_xmit;
uint32_t server_max_mux = 0;
uint16_t server_security_mode = 0;
+ uint32_t server_session_key = 0;
bool server_readbraw = false;
bool server_writebraw = false;
bool server_lockread = false;
@@ -2672,7 +2673,7 @@ static void cli_negprot_done(struct tevent_req *subreq)
server_security_mode = CVAL(vwv + 1, 0);
server_max_mux = SVAL(vwv + 1, 1);
server_max_xmit = IVAL(vwv + 3, 1);
- cli->sesskey = IVAL(vwv + 7, 1);
+ server_session_key = IVAL(vwv + 7, 1);
cli->serverzone = SVALS(vwv + 15, 1);
cli->serverzone *= 60;
/* this time arrives in real GMT */
@@ -2737,7 +2738,7 @@ static void cli_negprot_done(struct tevent_req *subreq)
server_security_mode = SVAL(vwv + 1, 0);
server_max_xmit = SVAL(vwv + 2, 0);
server_max_mux = SVAL(vwv + 3, 0);
- cli->sesskey = IVAL(vwv + 6, 0);
+ server_session_key = IVAL(vwv + 6, 0);
cli->serverzone = SVALS(vwv + 10, 0);
cli->serverzone *= 60;
/* this time is converted to GMT by make_unix_date */
@@ -2795,6 +2796,8 @@ static void cli_negprot_done(struct tevent_req *subreq)
cli->conn.smb1.server.lockread = server_lockread;
cli->conn.smb1.server.writeunlock = server_writeunlock;
+ cli->conn.smb1.server.session_key = server_session_key;
+
tevent_req_done(req);
}
diff --git a/source3/libsmb/clientgen.c b/source3/libsmb/clientgen.c
index 34826b0bea..170a2ca5f7 100644
--- a/source3/libsmb/clientgen.c
+++ b/source3/libsmb/clientgen.c
@@ -475,7 +475,7 @@ uint16_t cli_state_get_vc_num(struct cli_state *cli)
uint32_t cli_state_server_session_key(struct cli_state *cli)
{
- return cli->sesskey;
+ return cli->conn.smb1.server.session_key;
}
/****************************************************************************