[PATCH] Missing file attribute and device characteristic flags

Steve French smfrench at gmail.com
Tue Aug 13 16:55:01 MDT 2013


commit 6db9cd61b583587af01dbe15db10a7e894485741
Author: Steve French <smfrench at gmail.com>
Date:   Tue Aug 13 17:49:56 2013 -0500

    Add missing file attributes and device information characteristics.
    These new flags have been added for SMB3 (see MS-FSCC sections 2.5 and 2.6)

    Signed-off-by: Steve French <smfrench at gmail.com>
    Reviewed-by: Christof Schmitt <christof.schmitt at us.ibm.com>

diff --git a/libcli/smb/smb_constants.h b/libcli/smb/smb_constants.h
index 6dd7b28..84840e1 100644
--- a/libcli/smb/smb_constants.h
+++ b/libcli/smb/smb_constants.h
@@ -314,7 +314,9 @@ enum csc_policy {
 #define FILE_ATTRIBUTE_OFFLINE 0x1000L
 #define FILE_ATTRIBUTE_NONINDEXED 0x2000L
 #define FILE_ATTRIBUTE_ENCRYPTED 0x4000L
-#define FILE_ATTRIBUTE_ALL_MASK 0x7FFFL
+#define FILE_ATTRIBUTE_INTEGRITY_STREAM 0x8000L
+#define FILE_ATTRIBUTE_NO_SCRUB_DATA   0x20000L
+#define FILE_ATTRIBUTE_ALL_MASK        0x2FFFFL

 #define SAMBA_ATTRIBUTES_MASK (FILE_ATTRIBUTE_READONLY|\
  FILE_ATTRIBUTE_HIDDEN|\
diff --git a/source3/include/trans2.h b/source3/include/trans2.h
index 7a8c411..8dffd96 100644
--- a/source3/include/trans2.h
+++ b/source3/include/trans2.h
@@ -339,14 +339,17 @@ Byte offset   Type     name                description
 #define FILE_DEVICE_DISK 0x7

 /* SMB_FS_DEVICE_INFORMATION characteristics. */
-#define FILE_REMOVABLE_MEDIA 0x001
-#define FILE_READ_ONLY_DEVICE 0x002
-#define FILE_FLOPPY_DISKETTE 0x004
-#define FILE_WRITE_ONCE_MEDIA 0x008
-#define FILE_REMOTE_DEVICE 0x010
-#define FILE_DEVICE_IS_MOUNTED 0x020
-#define FILE_VIRTUAL_VOLUME 0x040
-#define FILE_DEVICE_SECURE_OPEN 0x100
+#define FILE_REMOVABLE_MEDIA 0x0001
+#define FILE_READ_ONLY_DEVICE 0x0002
+#define FILE_FLOPPY_DISKETTE 0x0004
+#define FILE_WRITE_ONCE_MEDIA 0x0008
+#define FILE_REMOTE_DEVICE 0x0010
+#define FILE_DEVICE_IS_MOUNTED 0x0020
+#define FILE_VIRTUAL_VOLUME 0x0040
+#define FILE_DEVICE_SECURE_OPEN 0x0100
+#define FILE_CHARACTERISTIC_TS_DEVICE 0x1000
+#define FILE_CHARACTERISTIC_WEBDAV_DEVICE 0x2000
+#define FILE_DEVICE_ALLOW_APPCONTAINER_TRAVERSAL 0x20000

 /* flags on trans2 findfirst/findnext that control search */
 #define FLAG_TRANS2_FIND_CLOSE          0x1

-- 
Thanks,

Steve


More information about the samba-technical mailing list