summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2004-11-17 06:30:06 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:05:55 -0500
commit5a34ef4df6152f5e970afbfb463d4665a823deb7 (patch)
tree53859e6014bf10a4cc958f99cbaac4e552fb0dab /source4
parentae7caf08c1f47f3ad08856cfea2a3e6e956b48ab (diff)
downloadsamba-5a34ef4df6152f5e970afbfb463d4665a823deb7.tar.gz
samba-5a34ef4df6152f5e970afbfb463d4665a823deb7.tar.bz2
samba-5a34ef4df6152f5e970afbfb463d4665a823deb7.zip
r3799: - added the bit for FS_ATTR_NAMED_STREAMS support into qfsinfo filesystem attribute reply
- pvfs passes the RAW-STREAMS test (This used to be commit c1a48a7542a52df734b54031f405d574e4c891e3)
Diffstat (limited to 'source4')
-rw-r--r--source4/include/smb.h18
-rw-r--r--source4/ntvfs/posix/pvfs_fsinfo.c4
-rw-r--r--source4/ntvfs/posix/pvfs_resolve.c4
-rw-r--r--source4/ntvfs/posix/vfs_posix.c10
-rw-r--r--source4/ntvfs/posix/vfs_posix.h3
-rwxr-xr-xsource4/script/tests/test_posix.sh4
6 files changed, 39 insertions, 4 deletions
diff --git a/source4/include/smb.h b/source4/include/smb.h
index 1d13b06e25..c70ab81611 100644
--- a/source4/include/smb.h
+++ b/source4/include/smb.h
@@ -611,4 +611,22 @@ enum brl_type {READ_LOCK, WRITE_LOCK, PENDING_READ_LOCK, PENDING_WRITE_LOCK};
#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 */
diff --git a/source4/ntvfs/posix/pvfs_fsinfo.c b/source4/ntvfs/posix/pvfs_fsinfo.c
index 7b2226579a..6d92713ac7 100644
--- a/source4/ntvfs/posix/pvfs_fsinfo.c
+++ b/source4/ntvfs/posix/pvfs_fsinfo.c
@@ -115,9 +115,9 @@ NTSTATUS pvfs_fsinfo(struct ntvfs_module_context *ntvfs,
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:
diff --git a/source4/ntvfs/posix/pvfs_resolve.c b/source4/ntvfs/posix/pvfs_resolve.c
index 302ccdae60..7329968d6c 100644
--- a/source4/ntvfs/posix/pvfs_resolve.c
+++ b/source4/ntvfs/posix/pvfs_resolve.c
@@ -458,6 +458,10 @@ NTSTATUS pvfs_resolve_name(struct pvfs_state *pvfs, TALLOC_CTX *mem_ctx,
(*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);
diff --git a/source4/ntvfs/posix/vfs_posix.c b/source4/ntvfs/posix/vfs_posix.c
index 2b4eef04ba..e02bd7aa32 100644
--- a/source4/ntvfs/posix/vfs_posix.c
+++ b/source4/ntvfs/posix/vfs_posix.c
@@ -55,6 +55,16 @@ static void pvfs_setup_options(struct pvfs_state *pvfs)
}
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;
+ }
}
diff --git a/source4/ntvfs/posix/vfs_posix.h b/source4/ntvfs/posix/vfs_posix.h
index 09d4bce085..a79c53ca2e 100644
--- a/source4/ntvfs/posix/vfs_posix.h
+++ b/source4/ntvfs/posix/vfs_posix.h
@@ -53,6 +53,9 @@ struct pvfs_state {
/* the sharing violation timeout */
uint_t sharing_violation_delay;
+
+ /* filesystem attributes (see FS_ATTR_*) */
+ uint32_t fs_attribs;
};
diff --git a/source4/script/tests/test_posix.sh b/source4/script/tests/test_posix.sh
index acca13888e..93732d438d 100755
--- a/source4/script/tests/test_posix.sh
+++ b/source4/script/tests/test_posix.sh
@@ -41,10 +41,10 @@ tests="$tests BASE-NTDENY1 BASE-NTDENY2 BASE-RENAME BASE-OPENATTR"
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