summaryrefslogtreecommitdiffstats
path: root/source4/torture/raw
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2010-09-15 23:02:43 +0200
committerGünther Deschner <gd@samba.org>2010-09-16 00:18:09 +0200
commitfe59119e06d334a06052b4aac71679488f581383 (patch)
tree34d3cc58c6a381c51a5ac2341d7a0e9841d768f4 /source4/torture/raw
parent3b87e3e95179c527a7fce7e5ed6cb1d33345a2ff (diff)
downloadsamba-fe59119e06d334a06052b4aac71679488f581383.tar.gz
samba-fe59119e06d334a06052b4aac71679488f581383.tar.xz
samba-fe59119e06d334a06052b4aac71679488f581383.zip
s4-smbtorture: try FSCTL_FIND_FILES_BY_SID with random blob data in RAW-IOCTL.
Guenther
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;