summaryrefslogtreecommitdiff
path: root/source4/torture/raw
diff options
context:
space:
mode:
Diffstat (limited to 'source4/torture/raw')
-rw-r--r--source4/torture/raw/ioctl.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/source4/torture/raw/ioctl.c b/source4/torture/raw/ioctl.c
index 87fbfaaab6..99dc039a7f 100644
--- a/source4/torture/raw/ioctl.c
+++ b/source4/torture/raw/ioctl.c
@@ -98,6 +98,27 @@ static bool test_fsctl(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
goto done;
}
+ printf("Trying FSCTL_FIND_FILES_BY_SID\n");
+ nt.ioctl.level = RAW_IOCTL_NTIOCTL;
+ nt.ntioctl.in.function = FSCTL_FIND_FILES_BY_SID;
+ nt.ntioctl.in.file.fnum = fnum;
+ nt.ntioctl.in.fsctl = true;
+ nt.ntioctl.in.filter = 0;
+ nt.ntioctl.in.max_data = 0;
+ nt.ntioctl.in.blob = data_blob(NULL, 1024);
+ /* definitely not a sid... */
+ generate_random_buffer(nt.ntioctl.in.blob.data,
+ nt.ntioctl.in.blob.length);
+ nt.ntioctl.in.blob.data[1] = 15+1;
+ status = smb_raw_ioctl(cli->tree, mem_ctx, &nt);
+ if (!NT_STATUS_EQUAL(status, NT_STATUS_INVALID_PARAMETER) &&
+ !NT_STATUS_EQUAL(status, NT_STATUS_NOT_IMPLEMENTED)) {
+ printf("Got unexpected error code: %s\n",
+ nt_errstr(status));
+ ret = false;
+ goto done;
+ }
+
printf("trying sparse file\n");
nt.ioctl.level = RAW_IOCTL_NTIOCTL;
nt.ntioctl.in.function = FSCTL_SET_SPARSE;