NTSTATUS status;
req = smb2_request_init_tree(tree, SMB2_OP_GETINFO, 0x28, true,
- io->in.blob.length);
+ io->in.input_buffer.length);
if (req == NULL) return NULL;
SCVAL(req->out.body, 0x02, io->in.info_type);
SCVAL(req->out.body, 0x03, io->in.info_class);
SIVAL(req->out.body, 0x04, io->in.output_buffer_length);
- SIVAL(req->out.body, 0x0C, io->in.reserved);
- SIVAL(req->out.body, 0x08, io->in.input_buffer_length);
+ /*
+ * uint16_t input_buffer_offset
+ * uint16_t reserved
+ * uint32_t input_buffer_length
+ *
+ * We use smb2_push_o32s32_blob() which would
+ * expect uint32_t offset, uint32_t length.
+ *
+ * Everything is little endian, we can just
+ * overwrite the reserved field later.
+ */
SIVAL(req->out.body, 0x10, io->in.additional_information);
SIVAL(req->out.body, 0x14, io->in.getinfo_flags);
smb2_push_handle(req->out.body+0x18, &io->in.file.handle);
/* this blob is used for quota queries */
- status = smb2_push_o32s32_blob(&req->out, 0x08, io->in.blob);
+ status = smb2_push_o32s32_blob(&req->out, 0x08, io->in.input_buffer);
if (!NT_STATUS_IS_OK(status)) {
talloc_free(req);
return NULL;
}
+ SSVAL(req->out.body, 0x0C, io->in.reserved);
+
smb2_transport_send(req);
return req;
b.in.info_type = smb2_level & 0xFF;
b.in.info_class = smb2_level >> 8;
b.in.output_buffer_length = 0x10000;
- b.in.input_buffer_length = 0;
+ b.in.input_buffer = data_blob_null;
b.in.file.handle = io->generic.in.file.handle;
if (io->generic.level == RAW_FILEINFO_SEC_DESC) {
uint8_t info_type;
uint8_t info_class;
uint32_t output_buffer_length;
- /* uint32_t input_buffer_offset; */
- uint32_t reserved;
- uint32_t input_buffer_length;
+ /* uint16_t input_buffer_offset; */
+ uint16_t reserved;
+ /* uint32_t input_buffer_length; */
uint32_t additional_information; /* SMB2_GETINFO_ADD_* */
uint32_t getinfo_flags; /* level specific */
union smb_handle file;
- DATA_BLOB blob;
+ DATA_BLOB input_buffer;
} in;
struct {
info->in.getinfo_flags = IVAL(req->in.body, 0x14);
info->in.file.ntvfs = smb2srv_pull_handle(req, req->in.body, 0x18);
SMB2SRV_CHECK(smb2_pull_o16As32_blob(&req->in, op,
- req->in.body+0x08, &info->in.blob));
+ req->in.body+0x08, &info->in.input_buffer));
SMB2SRV_CHECK_FILE_HANDLE(info->in.file.ntvfs);
SMB2SRV_CALL_NTVFS_BACKEND(smb2srv_getinfo_backend(op));
gf.in.info_type = SMB2_GETINFO_FILE;
gf.in.info_class = 0x16;
gf.in.output_buffer_length = 0x1000;
- gf.in.input_buffer_length = 0;
+ gf.in.input_buffer = data_blob_null;
req[1] = smb2_getinfo_send(tree, &gf);
gf.in.info_type = SMB2_GETINFO_FILE;
gf.in.info_class = 0x04; /* FILE_BASIC_INFORMATION */
gf.in.output_buffer_length = 0x1000;
- gf.in.input_buffer_length = 0;
+ gf.in.input_buffer = data_blob_null;
req[2] = smb2_getinfo_send(tree, &gf);