diff options
author | Stefan Metzmacher <metze@samba.org> | 2011-09-13 18:07:58 +0200 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2011-09-15 12:12:25 +0200 |
commit | 14e8ef14a0cf44476160d3c0a12d0166002987a0 (patch) | |
tree | 9d523f0a9bee2292e6adbc9b00974dd197ce3673 | |
parent | 596aa96d1746c84c30b8bea395ce1195a418a202 (diff) | |
download | samba-14e8ef14a0cf44476160d3c0a12d0166002987a0.tar.gz samba-14e8ef14a0cf44476160d3c0a12d0166002987a0.tar.bz2 samba-14e8ef14a0cf44476160d3c0a12d0166002987a0.zip |
s3:libsmb: move cli->*braw_supported to cli->conn.smb1.server.*braw
This is currently unused, but we might use it in future.
metze
-rw-r--r-- | source3/include/client.h | 4 | ||||
-rw-r--r-- | source3/libsmb/cliconnect.c | 13 | ||||
-rw-r--r-- | source3/libsmb/clisigning.c | 3 |
3 files changed, 11 insertions, 9 deletions
diff --git a/source3/include/client.h b/source3/include/client.h index 06e3c7aa7d..e51d72789c 100644 --- a/source3/include/client.h +++ b/source3/include/client.h @@ -66,8 +66,6 @@ struct cli_state { uint32 sesskey; int serverzone; uint32 servertime; - int readbraw_supported; - int writebraw_supported; int timeout; /* in milliseconds. */ int initialised; int win95; @@ -135,6 +133,8 @@ struct cli_state { uint32_t max_xmit; uint16_t max_mux; uint16_t security_mode; + bool readbraw; + bool writebraw; } server; uint32_t capabilities; diff --git a/source3/libsmb/cliconnect.c b/source3/libsmb/cliconnect.c index b571d0f59a..e2d0a2b8bd 100644 --- a/source3/libsmb/cliconnect.c +++ b/source3/libsmb/cliconnect.c @@ -2616,6 +2616,8 @@ 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; + bool server_readbraw = false; + bool server_writebraw = false; enum protocol_types protocol; status = cli_smb_recv(subreq, state, &inbuf, 1, &wct, &vwv, @@ -2669,8 +2671,8 @@ static void cli_negprot_done(struct tevent_req *subreq) cli->secblob = data_blob(bytes, num_bytes); server_capabilities = IVAL(vwv + 9, 1); if (server_capabilities & CAP_RAW_MODE) { - cli->readbraw_supported = True; - cli->writebraw_supported = True; + server_readbraw = true; + server_writebraw = true; } /* work out if they sent us a workgroup */ if (!(server_capabilities & CAP_EXTENDED_SECURITY) && @@ -2728,8 +2730,8 @@ static void cli_negprot_done(struct tevent_req *subreq) /* this time is converted to GMT by make_unix_date */ cli->servertime = make_unix_date( (char *)(vwv + 8), cli->serverzone); - cli->readbraw_supported = ((SVAL(vwv + 5, 0) & 0x1) != 0); - cli->writebraw_supported = ((SVAL(vwv + 5, 0) & 0x2) != 0); + server_readbraw = ((SVAL(vwv + 5, 0) & 0x1) != 0); + server_writebraw = ((SVAL(vwv + 5, 0) & 0x2) != 0); cli->secblob = data_blob(bytes, num_bytes); } else { /* the old core protocol */ @@ -2775,6 +2777,9 @@ static void cli_negprot_done(struct tevent_req *subreq) cli->conn.smb1.server.security_mode = server_security_mode; + cli->conn.smb1.server.readbraw = server_readbraw; + cli->conn.smb1.server.writebraw = server_writebraw; + tevent_req_done(req); } diff --git a/source3/libsmb/clisigning.c b/source3/libsmb/clisigning.c index acdc24faeb..4049aa0a59 100644 --- a/source3/libsmb/clisigning.c +++ b/source3/libsmb/clisigning.c @@ -36,9 +36,6 @@ bool cli_simple_set_signing(struct cli_state *cli, return false; } - cli->readbraw_supported = false; - cli->writebraw_supported = false; - return true; } |