summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
Diffstat (limited to 'source3')
-rw-r--r--source3/include/client.h2
-rw-r--r--source3/libsmb/cliconnect.c7
-rw-r--r--source3/libsmb/clientgen.c2
3 files changed, 7 insertions, 4 deletions
diff --git a/source3/include/client.h b/source3/include/client.h
index 09893a2e01..4179ae0f52 100644
--- a/source3/include/client.h
+++ b/source3/include/client.h
@@ -63,7 +63,6 @@ struct cli_state {
char *dev;
DATA_BLOB secblob; /* cryptkey or negTokenInit */
- uint32 sesskey;
int serverzone;
uint32 servertime;
int timeout; /* in milliseconds. */
@@ -137,6 +136,7 @@ struct cli_state {
bool writebraw;
bool lockread;
bool writeunlock;
+ uint32_t session_key;
} server;
uint32_t capabilities;
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;
}
/****************************************************************************