diff options
author | David Disseldorp <ddiss@samba.org> | 2015-02-12 10:58:20 +0100 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2015-03-09 21:27:07 +0100 |
commit | b5a635fb0ab0967e375281dd003cd7eb123f73fd (patch) | |
tree | 996634db5873b1856789e6bed3e56abcbb1ddfc6 | |
parent | 1359e859328567090bf80911083605e17fbd4519 (diff) | |
download | samba-b5a635fb0ab0967e375281dd003cd7eb123f73fd.tar.gz samba-b5a635fb0ab0967e375281dd003cd7eb123f73fd.tar.xz samba-b5a635fb0ab0967e375281dd003cd7eb123f73fd.zip |
idl/ioctl: change QAR response array to a DATA_BLOB
[MS-FSCC] specifies:
The number of FILE_ALLOCATED_RANGE_BUFFER elements returned is
computed by dividing the size of the returned output buffer (from
either SMB or SMB2, the lower-layer protocol that carries the FSCTL)
by the size of the FILE_ALLOCATED_RANGE_BUFFER element.
Ideally, this requirement could be defined in idl with the following:
[flag(NDR_REMAINING)] file_alloced_range_buf array[];
However, this is not currently supported by PIDL, so just use an opaque
data blob for now.
Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
-rw-r--r-- | librpc/idl/ioctl.idl | 6 | ||||
-rw-r--r-- | source4/torture/smb2/ioctl.c | 3 |
2 files changed, 8 insertions, 1 deletions
diff --git a/librpc/idl/ioctl.idl b/librpc/idl/ioctl.idl index 7760644173..d037956ab7 100644 --- a/librpc/idl/ioctl.idl +++ b/librpc/idl/ioctl.idl @@ -164,9 +164,13 @@ interface sparse * computed by dividing the size of the returned output buffer (from * either SMB or SMB2, the lower-layer protocol that carries the FSCTL) * by the size of the FILE_ALLOCATED_RANGE_BUFFER element. + * + * This logic can't (currently) be represented in pidl, so just use a + * blob. Perhaps in future we'll support: + * [flag(NDR_REMAINING)] file_alloced_range_buf array[]; */ typedef [public] struct { - file_alloced_range_buf *array; + [flag(NDR_REMAINING)] DATA_BLOB far_buf_array; } fsctl_query_alloced_ranges_rsp; /* 2.3.65 FSCTL_SET_ZERO_DATA Request */ diff --git a/source4/torture/smb2/ioctl.c b/source4/torture/smb2/ioctl.c index 931a013b79..d04fb4962e 100644 --- a/source4/torture/smb2/ioctl.c +++ b/source4/torture/smb2/ioctl.c @@ -2922,6 +2922,9 @@ static NTSTATUS test_ioctl_qar_req(struct torture_context *torture, status = NT_STATUS_UNSUCCESSFUL; goto err_out; } + /* move to next buffer */ + ioctl.smb2.out.out.data += sizeof(far_buf); + ioctl.smb2.out.out.length -= sizeof(far_buf); } done: |