summaryrefslogtreecommitdiff
path: root/source3/modules
diff options
context:
space:
mode:
authorDavid Disseldorp <ddiss@samba.org>2018-01-10 14:03:09 +0100
committerKarolin Seeger <kseeger@samba.org>2018-01-22 13:48:30 +0100
commitbde3d6402e6424015089fe3a2887c72eee45144f (patch)
tree68a5f2ce8014f614ac5b6e681e229f3a53dacc95 /source3/modules
parentda6ee0cf34af010d0796abddd06c83887e61c88e (diff)
downloadsamba-bde3d6402e6424015089fe3a2887c72eee45144f.tar.gz
vfs_default: use VFS statvfs macro in fs_capabilities
Currently the vfs_default fs_capabilities handler calls statvfs directly, rather than calling the vfs macro. This behaviour may cause issues for VFS modules that delegate fs_capabilities handling to vfs_default but offer their own statvfs hook. Bug: https://bugzilla.samba.org/show_bug.cgi?id=13208 Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> (cherry picked from commit 4b25c9f4a4d336a16894452862ea059701b025de) Autobuild-User(v4-7-test): Karolin Seeger <kseeger@samba.org> Autobuild-Date(v4-7-test): Mon Jan 22 13:48:30 CET 2018 on sn-devel-144
Diffstat (limited to 'source3/modules')
-rw-r--r--source3/modules/vfs_default.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/source3/modules/vfs_default.c b/source3/modules/vfs_default.c
index 53d97859ec3..6686303f166 100644
--- a/source3/modules/vfs_default.c
+++ b/source3/modules/vfs_default.c
@@ -129,8 +129,14 @@ static uint32_t vfswrap_fs_capabilities(struct vfs_handle_struct *handle,
struct vfs_statvfs_struct statbuf;
int ret;
+ smb_fname_cpath = synthetic_smb_fname(talloc_tos(), conn->connectpath,
+ NULL, NULL, 0);
+ if (smb_fname_cpath == NULL) {
+ return caps;
+ }
+
ZERO_STRUCT(statbuf);
- ret = sys_statvfs(conn->connectpath, &statbuf);
+ ret = SMB_VFS_STATVFS(conn, smb_fname_cpath, &statbuf);
if (ret == 0) {
caps = statbuf.FsCapabilities;
}
@@ -140,12 +146,6 @@ static uint32_t vfswrap_fs_capabilities(struct vfs_handle_struct *handle,
/* Work out what timestamp resolution we can
* use when setting a timestamp. */
- smb_fname_cpath = synthetic_smb_fname(talloc_tos(), conn->connectpath,
- NULL, NULL, 0);
- if (smb_fname_cpath == NULL) {
- return caps;
- }
-
ret = SMB_VFS_STAT(conn, smb_fname_cpath);
if (ret == -1) {
TALLOC_FREE(smb_fname_cpath);