1
0
mirror of https://github.com/samba-team/samba.git synced 2025-11-20 08:23:50 +03:00

r11680: added smb2_close(). This also demonstrates that file handles are 16

bytes, not 20 bytes (metze, you were right!)
This commit is contained in:
Andrew Tridgell
2005-11-11 13:08:31 +00:00
committed by Gerald (Jerry) Carter
parent 548fbd86b3
commit d3bcc6628c
6 changed files with 166 additions and 19 deletions

View File

@@ -84,14 +84,12 @@ struct smb2_request *smb2_create_send(struct smb2_tree *tree, struct smb2_create
*/
NTSTATUS smb2_create_recv(struct smb2_request *req, struct smb2_create *io)
{
int i;
if (!smb2_request_receive(req) ||
smb2_request_is_error(req)) {
return smb2_request_destroy(req);
}
if (req->in.body_size < 0x54) {
printf("body size %d\n", req->in.body_size);
return NT_STATUS_BUFFER_TOO_SMALL;
}
@@ -106,10 +104,11 @@ NTSTATUS smb2_create_recv(struct smb2_request *req, struct smb2_create *io)
io->out.unknown5 = IVAL(req->in.body, 0x2C);
io->out.unknown6 = IVAL(req->in.body, 0x30);
io->out.unknown7 = IVAL(req->in.body, 0x34);
memcpy(io->out.handle.data, req->in.body+0x38, 20);
for (i=0;i<2;i++) {
io->out.unknown8[i] = IVAL(req->in.body, 0x4C + i*4);
}
io->out.unknown8 = IVAL(req->in.body, 0x38);
io->out.unknown9 = IVAL(req->in.body, 0x3C);
io->out.handle.data[0] = BVAL(req->in.body, 0x40);
io->out.handle.data[1] = BVAL(req->in.body, 0x48);
io->out.unknown10 = IVAL(req->in.body, 0x50);
return smb2_request_destroy(req);
}