summaryrefslogtreecommitdiff
path: root/source4/libcli/smb2/close.c
diff options
context:
space:
mode:
Diffstat (limited to 'source4/libcli/smb2/close.c')
-rw-r--r--source4/libcli/smb2/close.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/source4/libcli/smb2/close.c b/source4/libcli/smb2/close.c
index cf1cdbef5f..c851d60be4 100644
--- a/source4/libcli/smb2/close.c
+++ b/source4/libcli/smb2/close.c
@@ -32,13 +32,12 @@ struct smb2_request *smb2_close_send(struct smb2_tree *tree, struct smb2_close *
{
struct smb2_request *req;
- req = smb2_request_init_tree(tree, SMB2_OP_CLOSE, 0x18);
+ req = smb2_request_init_tree(tree, SMB2_OP_CLOSE, 0x18, 0);
if (req == NULL) return NULL;
- SSVAL(req->out.body, 0x00, io->in.buffer_code);
SSVAL(req->out.body, 0x02, io->in.flags);
SIVAL(req->out.body, 0x04, io->in._pad);
- smb2_put_handle(req->out.body+0x08, &io->in.handle);
+ smb2_push_handle(req->out.body+0x08, &io->in.handle);
smb2_transport_send(req);
@@ -56,11 +55,7 @@ NTSTATUS smb2_close_recv(struct smb2_request *req, struct smb2_close *io)
return smb2_request_destroy(req);
}
- if (req->in.body_size < 0x3C) {
- return NT_STATUS_BUFFER_TOO_SMALL;
- }
-
- SMB2_CHECK_BUFFER_CODE(req, 0x3C);
+ SMB2_CHECK_PACKET_RECV(req, 0x3C, False);
io->out.flags = SVAL(req->in.body, 0x02);
io->out._pad = IVAL(req->in.body, 0x04);