summaryrefslogtreecommitdiff
path: root/source3/libsmb
diff options
context:
space:
mode:
Diffstat (limited to 'source3/libsmb')
-rw-r--r--source3/libsmb/cliconnect.c21
1 files changed, 17 insertions, 4 deletions
diff --git a/source3/libsmb/cliconnect.c b/source3/libsmb/cliconnect.c
index 0917886752..bc220280eb 100644
--- a/source3/libsmb/cliconnect.c
+++ b/source3/libsmb/cliconnect.c
@@ -260,8 +260,10 @@ static void cli_session_setup_lanman2_done(struct tevent_req *subreq)
uint8_t *p;
NTSTATUS status;
ssize_t ret;
+ uint8_t wct;
+ uint16_t *vwv;
- status = cli_smb_recv(subreq, state, &in, 0, NULL, NULL,
+ status = cli_smb_recv(subreq, state, &in, 3, &wct, &vwv,
&num_bytes, &bytes);
TALLOC_FREE(subreq);
if (!NT_STATUS_IS_OK(status)) {
@@ -273,6 +275,7 @@ static void cli_session_setup_lanman2_done(struct tevent_req *subreq)
p = bytes;
cli->vuid = SVAL(inbuf, smb_uid);
+ cli->is_guestlogin = ((SVAL(vwv+2, 0) & 1) != 0);
status = smb_bytes_talloc_string(cli,
inbuf,
@@ -485,8 +488,10 @@ static void cli_session_setup_guest_done(struct tevent_req *subreq)
uint8_t *p;
NTSTATUS status;
ssize_t ret;
+ uint8_t wct;
+ uint16_t *vwv;
- status = cli_smb_recv(subreq, state, &in, 0, NULL, NULL,
+ status = cli_smb_recv(subreq, state, &in, 3, &wct, &vwv,
&num_bytes, &bytes);
TALLOC_FREE(subreq);
if (!NT_STATUS_IS_OK(status)) {
@@ -498,6 +503,7 @@ static void cli_session_setup_guest_done(struct tevent_req *subreq)
p = bytes;
cli->vuid = SVAL(inbuf, smb_uid);
+ cli->is_guestlogin = ((SVAL(vwv+2, 0) & 1) != 0);
status = smb_bytes_talloc_string(cli,
inbuf,
@@ -690,8 +696,10 @@ static void cli_session_setup_plain_done(struct tevent_req *subreq)
uint8_t *p;
NTSTATUS status;
ssize_t ret;
+ uint8_t wct;
+ uint16_t *vwv;
- status = cli_smb_recv(subreq, state, &in, 0, NULL, NULL,
+ status = cli_smb_recv(subreq, state, &in, 3, &wct, &vwv,
&num_bytes, &bytes);
TALLOC_FREE(subreq);
if (tevent_req_nterror(req, status)) {
@@ -702,6 +710,7 @@ static void cli_session_setup_plain_done(struct tevent_req *subreq)
p = bytes;
cli->vuid = SVAL(inbuf, smb_uid);
+ cli->is_guestlogin = ((SVAL(vwv+2, 0) & 1) != 0);
status = smb_bytes_talloc_string(cli,
inbuf,
@@ -1043,8 +1052,10 @@ static void cli_session_setup_nt1_done(struct tevent_req *subreq)
uint8_t *p;
NTSTATUS status;
ssize_t ret;
+ uint8_t wct;
+ uint16_t *vwv;
- status = cli_smb_recv(subreq, state, &in, 0, NULL, NULL,
+ status = cli_smb_recv(subreq, state, &in, 3, &wct, &vwv,
&num_bytes, &bytes);
TALLOC_FREE(subreq);
if (!NT_STATUS_IS_OK(status)) {
@@ -1056,6 +1067,7 @@ static void cli_session_setup_nt1_done(struct tevent_req *subreq)
p = bytes;
cli->vuid = SVAL(inbuf, smb_uid);
+ cli->is_guestlogin = ((SVAL(vwv+2, 0) & 1) != 0);
status = smb_bytes_talloc_string(cli,
inbuf,
@@ -1294,6 +1306,7 @@ static void cli_sesssetup_blob_done(struct tevent_req *subreq)
state->inbuf = (char *)inbuf;
cli->vuid = SVAL(state->inbuf, smb_uid);
+ cli->is_guestlogin = ((SVAL(vwv+2, 0) & 1) != 0);
blob_length = SVAL(vwv+3, 0);
if (blob_length > num_bytes) {