summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2010-02-20 15:14:43 +0100
committerVolker Lendecke <vl@samba.org>2010-02-22 23:23:18 +0100
commit47c61b4f15a8b366e51bc0de0a3427eecd0d65a3 (patch)
tree7536b87de12df4cff1a0ce889574b59ce437dd59 /source3
parent299d9c409dd20b1b5abe4abf2a11c121c8a76abb (diff)
downloadsamba-47c61b4f15a8b366e51bc0de0a3427eecd0d65a3.tar.gz
samba-47c61b4f15a8b366e51bc0de0a3427eecd0d65a3.tar.bz2
samba-47c61b4f15a8b366e51bc0de0a3427eecd0d65a3.zip
s3: Explicitly handle inbuf in cli_session_setup_guest_done
Diffstat (limited to 'source3')
-rw-r--r--source3/libsmb/cliconnect.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/source3/libsmb/cliconnect.c b/source3/libsmb/cliconnect.c
index f5e763c1f2..f24582df00 100644
--- a/source3/libsmb/cliconnect.c
+++ b/source3/libsmb/cliconnect.c
@@ -264,20 +264,21 @@ static void cli_session_setup_guest_done(struct tevent_req *subreq)
req, struct cli_session_setup_guest_state);
struct cli_state *cli = state->cli;
uint32_t num_bytes;
+ uint8_t *in;
char *inbuf;
uint8_t *bytes;
uint8_t *p;
NTSTATUS status;
- status = cli_smb_recv(subreq, NULL, NULL, 0, NULL, NULL,
+ status = cli_smb_recv(subreq, state, &in, 0, NULL, NULL,
&num_bytes, &bytes);
+ TALLOC_FREE(subreq);
if (!NT_STATUS_IS_OK(status)) {
- TALLOC_FREE(subreq);
tevent_req_nterror(req, status);
return;
}
- inbuf = (char *)cli_smb_inbuf(subreq);
+ inbuf = (char *)in;
p = bytes;
cli->vuid = SVAL(inbuf, smb_uid);
@@ -293,8 +294,6 @@ static void cli_session_setup_guest_done(struct tevent_req *subreq)
cli->is_samba = True;
}
- TALLOC_FREE(subreq);
-
status = cli_set_username(cli, "");
if (!NT_STATUS_IS_OK(status)) {
tevent_req_nterror(req, status);