summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2012-08-01 11:46:22 +0200
committerStefan Metzmacher <metze@samba.org>2012-08-01 14:17:16 +0200
commit3682eb80ab071ced87bb64def776a2a8722cb2b1 (patch)
tree1408bb01eb113312ea4268104325ca47b698b178
parent137d65b39790fec10f908e25633b80d22e54e0b6 (diff)
downloadsamba-3682eb80ab071ced87bb64def776a2a8722cb2b1.tar.gz
samba-3682eb80ab071ced87bb64def776a2a8722cb2b1.tar.bz2
samba-3682eb80ab071ced87bb64def776a2a8722cb2b1.zip
s3:libsmb: add a optional_support helper variable
metze
-rw-r--r--source3/libsmb/cliconnect.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/source3/libsmb/cliconnect.c b/source3/libsmb/cliconnect.c
index 2b32529436..9850511b85 100644
--- a/source3/libsmb/cliconnect.c
+++ b/source3/libsmb/cliconnect.c
@@ -2431,6 +2431,7 @@ static void cli_tcon_andx_done(struct tevent_req *subreq)
uint32_t num_bytes;
uint8_t *bytes;
NTSTATUS status;
+ uint16_t optional_support = 0;
status = cli_smb_recv(subreq, state, &in, 0, &wct, &vwv,
&num_bytes, &bytes);
@@ -2474,7 +2475,11 @@ static void cli_tcon_andx_done(struct tevent_req *subreq)
cli->dfsroot = false;
if ((wct > 2) && (smbXcli_conn_protocol(cli->conn) >= PROTOCOL_LANMAN2)) {
- cli->dfsroot = ((SVAL(vwv+2, 0) & SMB_SHARE_IN_DFS) != 0);
+ optional_support = SVAL(vwv+2, 0);
+ }
+
+ if (optional_support & SMB_SHARE_IN_DFS) {
+ cli->dfsroot = true;
}
cli_state_set_tid(cli, SVAL(inhdr, HDR_TID));