1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-08 05:57:51 +03:00

s4-smbtorture: try FSCTL_FIND_FILES_BY_SID with random blob data in RAW-IOCTL.

Guenther
This commit is contained in:
Günther Deschner 2010-09-15 23:02:43 +02:00
parent 3b87e3e951
commit fe59119e06

View File

@ -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;