summaryrefslogtreecommitdiff
path: root/source3/modules/vfs_default.c
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2008-01-21 15:10:44 +0100
committerVolker Lendecke <vl@samba.org>2008-01-21 16:14:27 +0100
commit9a226532221b88369b913bc9f9d6ec335620349f (patch)
treec6eee79c808026fb97f974ff25fc3517ccf8a36d /source3/modules/vfs_default.c
parentd221d53f3a523ac014e9f33b67f0b7d777dfb171 (diff)
downloadsamba-9a226532221b88369b913bc9f9d6ec335620349f.tar.gz
samba-9a226532221b88369b913bc9f9d6ec335620349f.tar.bz2
samba-9a226532221b88369b913bc9f9d6ec335620349f.zip
Add SMB_VFS_FS_CAPABILITIES
It turns out that this is a necessary operation, separate from statvfs. statvfs can fail during tcon, so conn->fs_capabilities would never see that we support streams on a particular share. James, can you check that I got the darwin variant right? Thanks! (This used to be commit 3ad798d803b3b023533bb48e6993885f22b96095)
Diffstat (limited to 'source3/modules/vfs_default.c')
-rw-r--r--source3/modules/vfs_default.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/source3/modules/vfs_default.c b/source3/modules/vfs_default.c
index 2e620d04cc..17d0dfabaf 100644
--- a/source3/modules/vfs_default.c
+++ b/source3/modules/vfs_default.c
@@ -90,6 +90,17 @@ static int vfswrap_statvfs(struct vfs_handle_struct *handle, const char *path,
return sys_statvfs(path, statbuf);
}
+static uint32_t vfswrap_fs_capabilities(struct vfs_handle_struct *handle)
+{
+#if defined(DARWINOS)
+ struct statfs sbuf;
+ ZERO_STRUCT(sbuf);
+ sys_statvfs(handle->conn->connectpath, &sbuf);
+ return sbuf.FsCapabilities;
+#endif
+ return FILE_CASE_SENSITIVE_SEARCH | FILE_CASE_PRESERVED_NAMES;
+}
+
/* Directory operations */
static SMB_STRUCT_DIR *vfswrap_opendir(vfs_handle_struct *handle, const char *fname, const char *mask, uint32 attr)
@@ -1330,6 +1341,8 @@ static vfs_op_tuple vfs_default_ops[] = {
SMB_VFS_LAYER_OPAQUE},
{SMB_VFS_OP(vfswrap_statvfs), SMB_VFS_OP_STATVFS,
SMB_VFS_LAYER_OPAQUE},
+ {SMB_VFS_OP(vfswrap_fs_capabilities), SMB_VFS_OP_FS_CAPABILITIES,
+ SMB_VFS_LAYER_OPAQUE},
/* Directory operations */