s4: add SMB2_FSCTL opcodes
authorDavid Disseldorp <ddiss@suse.de>
Mon, 26 Sep 2011 11:38:16 +0000 (13:38 +0200)
committerDavid Disseldorp <ddiss@samba.org>
Thu, 29 Sep 2011 12:47:05 +0000 (14:47 +0200)
Also, skip samba4.smb2.ioctl for now. Snapshots are not supported by
default.

Autobuild-User: David Disseldorp <ddiss@samba.org>
Autobuild-Date: Thu Sep 29 14:47:05 CEST 2011 on sn-devel-104

source4/libcli/raw/interfaces.h
source4/selftest/skip
source4/torture/smb2/ioctl.c

index 13586c3c892867c8fbd440dfe4ec970b3ef8f31b..7f42926a593d1df1f76e80fe1548faaab86378ce 100644 (file)
@@ -2191,6 +2191,20 @@ enum smb_ioctl_level {
        RAW_IOCTL_SMB2_NO_HANDLE
 };
 
+/* 2.2.31 SMB2 IOCTL Request */
+#define SMB2_IOCTL_FLAG_IS_FSCTL               0x00000001
+
+#define SMB2_FSCTL_DFS_GET_REFERRALS           0x00060194
+#define SMB2_FSCTL_PIPE_PEEK                   0x0011400C
+#define SMB2_FSCTL_PIPE_WAIT                   0x00110018
+#define SMB2_FSCTL_PIPE_TRANSCEIVE             0x0011C017
+#define SMB2_FSCTL_SRV_COPYCHUNK               0x001440F2
+#define SMB2_FSCTL_SRV_ENUM_SNAPS              0x00144064
+#define SMB2_FSCTL_SRV_REQUEST_RESUME_KEY      0x00140078
+#define SMB2_FSCTL_SRV_READ_HASH               0x001441bb
+#define SMB2_FSCTL_SRV_COPYCHUNK_WRITE         0x001480F2
+#define SMB2_FSCTL_LMR_REQ_RESILIENCY          0x001401D4
+
 /*
   union for ioctl() backend
 */
index 5400be1e3060c7f946d4c3ba602c8ed46e73dc98..acaa44f7bf41030ca3725d7539877b4b11e53234 100644 (file)
@@ -78,3 +78,4 @@ bench # don't run benchmarks in our selftest
 ^samba4.blackbox.ktpass # this test isn't portable ...
 ^samba4.drs.repl_schema.python # flakey test
 ^samba4.nbt.winsreplication # flakey test
+^samba4.smb2.ioctl # snapshots not supported by default
index bc8a96a58f81871e38b0b414f76bdefc0f9df012..f96893ab443451b80b76bb397db1c20fb0753e95 100644 (file)
@@ -58,13 +58,13 @@ static bool test_ioctl_get_shadow_copy(struct torture_context *torture,
        ZERO_STRUCT(ioctl);
        ioctl.smb2.level = RAW_IOCTL_SMB2;
        ioctl.smb2.in.file.handle = h;
-       ioctl.smb2.in.function = 0x144064;      /* FSCTL_GET_SHADOW_COPY_DATA 0x144064 */
+       ioctl.smb2.in.function = SMB2_FSCTL_SRV_ENUM_SNAPS;
        ioctl.smb2.in.max_response_size = 16;
-       ioctl.smb2.in.flags = 1;                /* Is FSCTL */
+       ioctl.smb2.in.flags = SMB2_IOCTL_FLAG_IS_FSCTL;
 
        status = smb2_ioctl(tree, tmp_ctx, &ioctl.smb2);
        if (!NT_STATUS_IS_OK(status)) {
-               printf("FSCTL_GET_SHADOW_COPY_DATA failed\n");
+               printf("SMB2_FSCTL_SRV_ENUM_SNAPS failed\n");
                return false;
        }