diff options
Diffstat (limited to 'source3/modules')
-rw-r--r-- | source3/modules/vfs_default.c | 13 | ||||
-rw-r--r-- | source3/modules/vfs_streams_depot.c | 13 | ||||
-rw-r--r-- | source3/modules/vfs_streams_xattr.c | 13 |
3 files changed, 19 insertions, 20 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 */ diff --git a/source3/modules/vfs_streams_depot.c b/source3/modules/vfs_streams_depot.c index 68e7a75947..fa85ea4a57 100644 --- a/source3/modules/vfs_streams_depot.c +++ b/source3/modules/vfs_streams_depot.c @@ -610,22 +610,15 @@ static NTSTATUS streams_depot_streaminfo(vfs_handle_struct *handle, return NT_STATUS_OK; } -static int streams_depot_statvfs(struct vfs_handle_struct *handle, - const char *path, - struct vfs_statvfs_struct *statbuf) +static uint32_t streams_depot_fs_capabilities(struct vfs_handle_struct *handle) { - int ret; - - ret = SMB_VFS_NEXT_STATVFS(handle, path, statbuf); - statbuf->FsCapabilities |= FILE_NAMED_STREAMS; - return ret; - + return SMB_VFS_NEXT_FS_CAPABILITIES(handle) | FILE_NAMED_STREAMS; } /* VFS operations structure */ static vfs_op_tuple streams_depot_ops[] = { - {SMB_VFS_OP(streams_depot_statvfs), SMB_VFS_OP_STATVFS, + {SMB_VFS_OP(streams_depot_fs_capabilities), SMB_VFS_OP_FS_CAPABILITIES, SMB_VFS_LAYER_TRANSPARENT}, {SMB_VFS_OP(streams_depot_open), SMB_VFS_OP_OPEN, SMB_VFS_LAYER_TRANSPARENT}, diff --git a/source3/modules/vfs_streams_xattr.c b/source3/modules/vfs_streams_xattr.c index 7ce90ab30b..965d57ff88 100644 --- a/source3/modules/vfs_streams_xattr.c +++ b/source3/modules/vfs_streams_xattr.c @@ -560,16 +560,9 @@ static NTSTATUS streams_xattr_streaminfo(vfs_handle_struct *handle, return NT_STATUS_OK; } -static int streams_xattr_statvfs(struct vfs_handle_struct *handle, - const char *path, - struct vfs_statvfs_struct *statbuf) +static uint32_t streams_xattr_fs_capabilities(struct vfs_handle_struct *handle) { - int ret; - - ret = SMB_VFS_NEXT_STATVFS(handle, path, statbuf); - statbuf->FsCapabilities |= FILE_NAMED_STREAMS; - return ret; - + return SMB_VFS_NEXT_FS_CAPABILITIES(handle) | FILE_NAMED_STREAMS; } static ssize_t streams_xattr_pwrite(vfs_handle_struct *handle, @@ -663,7 +656,7 @@ static ssize_t streams_xattr_pread(vfs_handle_struct *handle, /* VFS operations structure */ static vfs_op_tuple streams_xattr_ops[] = { - {SMB_VFS_OP(streams_xattr_statvfs), SMB_VFS_OP_STATVFS, + {SMB_VFS_OP(streams_xattr_fs_capabilities), SMB_VFS_OP_FS_CAPABILITIES, SMB_VFS_LAYER_TRANSPARENT}, {SMB_VFS_OP(streams_xattr_open), SMB_VFS_OP_OPEN, SMB_VFS_LAYER_TRANSPARENT}, |