svn commit: samba r3799 - in branches/SAMBA_4_0/source: include ntvfs/posix script/tests

tridge at samba.org tridge at samba.org
Wed Nov 17 06:30:06 GMT 2004


Author: tridge
Date: 2004-11-17 06:30:06 +0000 (Wed, 17 Nov 2004)
New Revision: 3799

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=3799

Log:
- added the bit for FS_ATTR_NAMED_STREAMS support into qfsinfo filesystem attribute reply

- pvfs passes the RAW-STREAMS test

Modified:
   branches/SAMBA_4_0/source/include/smb.h
   branches/SAMBA_4_0/source/ntvfs/posix/pvfs_fsinfo.c
   branches/SAMBA_4_0/source/ntvfs/posix/pvfs_resolve.c
   branches/SAMBA_4_0/source/ntvfs/posix/vfs_posix.c
   branches/SAMBA_4_0/source/ntvfs/posix/vfs_posix.h
   branches/SAMBA_4_0/source/script/tests/test_posix.sh


Changeset:
Modified: branches/SAMBA_4_0/source/include/smb.h
===================================================================
--- branches/SAMBA_4_0/source/include/smb.h	2004-11-17 05:58:04 UTC (rev 3798)
+++ branches/SAMBA_4_0/source/include/smb.h	2004-11-17 06:30:06 UTC (rev 3799)
@@ -611,4 +611,22 @@
 #define STR_LEN_NOTERM 256 /* the length field is the unterminated length */
 
 
+/*
+  filesystem attribute bits
+*/
+#define FS_ATTR_CASE_SENSITIVE_SEARCH             0x00000001
+#define FS_ATTR_CASE_PRESERVED_NAMES              0x00000002
+#define FS_ATTR_UNICODE_ON_DISK                   0x00000004
+#define FS_ATTR_PERSISTANT_ACLS                   0x00000008
+#define FS_ATTR_COMPRESSION                       0x00000010
+#define FS_ATTR_QUOTAS                            0x00000020
+#define FS_ATTR_SPARSE_FILES                      0x00000040
+#define FS_ATTR_REPARSE_POINTS                    0x00000080
+#define FS_ATTR_REMOTE_STORAGE                    0x00000100
+#define FS_ATTR_IS_COMPRESSED                     0x00008000
+#define FS_ATTR_OBJECT_IDS                        0x00010000
+#define FS_ATTR_ENCRYPTION                        0x00020000
+#define FS_ATTR_NAMED_STREAMS                     0x00040000
+
+
 #endif /* _SMB_H */

Modified: branches/SAMBA_4_0/source/ntvfs/posix/pvfs_fsinfo.c
===================================================================
--- branches/SAMBA_4_0/source/ntvfs/posix/pvfs_fsinfo.c	2004-11-17 05:58:04 UTC (rev 3798)
+++ branches/SAMBA_4_0/source/ntvfs/posix/pvfs_fsinfo.c	2004-11-17 06:30:06 UTC (rev 3799)
@@ -115,9 +115,9 @@
 
 	case RAW_QFS_ATTRIBUTE_INFO:
 	case RAW_QFS_ATTRIBUTE_INFORMATION:
-		fs->attribute_info.out.fs_attr = 0;
+		fs->attribute_info.out.fs_attr                   = pvfs->fs_attribs;
 		fs->attribute_info.out.max_file_component_length = 255;
-		fs->attribute_info.out.fs_type.s = req->tcon->fs_type;
+		fs->attribute_info.out.fs_type.s                 = req->tcon->fs_type;
 		return NT_STATUS_OK;
 
 	case RAW_QFS_QUOTA_INFORMATION:

Modified: branches/SAMBA_4_0/source/ntvfs/posix/pvfs_resolve.c
===================================================================
--- branches/SAMBA_4_0/source/ntvfs/posix/pvfs_resolve.c	2004-11-17 05:58:04 UTC (rev 3798)
+++ branches/SAMBA_4_0/source/ntvfs/posix/pvfs_resolve.c	2004-11-17 06:30:06 UTC (rev 3799)
@@ -458,6 +458,10 @@
 	(*name)->exists = False;
 	(*name)->stream_exists = False;
 
+	if (!(pvfs->fs_attribs & FS_ATTR_NAMED_STREAMS)) {
+		flags &= ~PVFS_RESOLVE_STREAMS;
+	}
+
 	/* do the basic conversion to a unix formatted path,
 	   also checking for allowable characters */
 	status = pvfs_unix_path(pvfs, cifs_name, flags, *name);

Modified: branches/SAMBA_4_0/source/ntvfs/posix/vfs_posix.c
===================================================================
--- branches/SAMBA_4_0/source/ntvfs/posix/vfs_posix.c	2004-11-17 05:58:04 UTC (rev 3798)
+++ branches/SAMBA_4_0/source/ntvfs/posix/vfs_posix.c	2004-11-17 06:30:06 UTC (rev 3799)
@@ -55,6 +55,16 @@
 	}
 
 	pvfs->share_name = talloc_strdup(pvfs, lp_servicename(snum));
+
+	pvfs->fs_attribs = 
+		FS_ATTR_CASE_SENSITIVE_SEARCH | 
+		FS_ATTR_CASE_PRESERVED_NAMES |
+		FS_ATTR_UNICODE_ON_DISK |
+		FS_ATTR_SPARSE_FILES;
+
+	if (pvfs->flags & PVFS_FLAG_XATTR_ENABLE) {
+		pvfs->fs_attribs |= FS_ATTR_NAMED_STREAMS;
+	}
 }
 
 

Modified: branches/SAMBA_4_0/source/ntvfs/posix/vfs_posix.h
===================================================================
--- branches/SAMBA_4_0/source/ntvfs/posix/vfs_posix.h	2004-11-17 05:58:04 UTC (rev 3798)
+++ branches/SAMBA_4_0/source/ntvfs/posix/vfs_posix.h	2004-11-17 06:30:06 UTC (rev 3799)
@@ -53,6 +53,9 @@
 
 	/* the sharing violation timeout */
 	uint_t sharing_violation_delay;
+
+	/* filesystem attributes (see FS_ATTR_*) */
+	uint32_t fs_attribs;
 };
 
 

Modified: branches/SAMBA_4_0/source/script/tests/test_posix.sh
===================================================================
--- branches/SAMBA_4_0/source/script/tests/test_posix.sh	2004-11-17 05:58:04 UTC (rev 3798)
+++ branches/SAMBA_4_0/source/script/tests/test_posix.sh	2004-11-17 06:30:06 UTC (rev 3799)
@@ -41,10 +41,10 @@
 tests="$tests RAW-QFSINFO RAW-QFILEINFO RAW-SFILEINFO-BUG RAW-SFILEINFO"
 tests="$tests RAW-LOCK RAW-MKDIR RAW-SEEK RAW-CONTEXT RAW-MUX RAW-OPEN RAW-WRITE"
 tests="$tests RAW-UNLINK RAW-READ RAW-CLOSE RAW-IOCTL RAW-SEARCH RAW-CHKPATH RAW-RENAME"
-tests="$tests RAW-EAS"
+tests="$tests RAW-EAS RAW-STREAMS"
 tests="$tests LOCAL-ICONV LOCAL-TALLOC LOCAL-MESSAGING LOCAL-BINDING LOCAL-IDTREE"
 
-soon="BASE-CHARSET RAW-OPLOCK RAW-NOTIFY BASE-DELAYWRITE RAW-STREAMS"
+soon="BASE-CHARSET RAW-OPLOCK RAW-NOTIFY BASE-DELAYWRITE"
 
 for t in $tests; do
     if [ ! -z "$start" -a "$start" != $t ]; then



More information about the samba-cvs mailing list