summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source4/torture/raw/ioctl.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/source4/torture/raw/ioctl.c b/source4/torture/raw/ioctl.c
index b8bf3b2701..2768002893 100644
--- a/source4/torture/raw/ioctl.c
+++ b/source4/torture/raw/ioctl.c
@@ -105,6 +105,20 @@ static BOOL test_fsctl(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
status = smb_raw_ioctl(cli->tree, mem_ctx, &nt);
CHECK_STATUS(status, NT_STATUS_OK);
+ printf("trying batch oplock\n");
+ nt.ioctl.level = RAW_IOCTL_NTIOCTL;
+ nt.ntioctl.in.function = (FSCTL_FILESYSTEM | (2<<2));
+ nt.ntioctl.in.fnum = fnum;
+ nt.ntioctl.in.fsctl = True;
+ nt.ntioctl.in.filter = 0;
+
+ status = smb_raw_ioctl(cli->tree, mem_ctx, &nt);
+ if (NT_STATUS_IS_OK(status)) {
+ printf("Server supports batch oplock upgrades on open files\n");
+ } else {
+ printf("Server does not support batch oplock upgrades on open files\n");
+ }
+
printf("Trying bad handle\n");
nt.ntioctl.in.fnum = fnum+1;
status = smb_raw_ioctl(cli->tree, mem_ctx, &nt);