diff options
author | Jeremy Allison <jra@samba.org> | 2017-06-01 11:45:25 -0700 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2017-06-18 02:49:25 +0200 |
commit | 0da76414fdc6a0aacea6282a76b384a702615408 (patch) | |
tree | e762b30e8ffbe21577be8f6d65dd2f0480787d82 /source3/modules/vfs_cap.c | |
parent | 0037815453fa6141d3c0325c3ab197326324ab53 (diff) | |
download | samba-0da76414fdc6a0aacea6282a76b384a702615408.tar.gz |
s3: VFS: Change SMB_VFS_GET_QUOTA to use const struct smb_filename * instead of const char *.
We need to migrate all pathname based VFS calls to use a struct
to finish modernising the VFS with extra timestamp and flags parameters.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Richard Sharpe <realrichardsharpe@gmail.com>
Diffstat (limited to 'source3/modules/vfs_cap.c')
-rw-r--r-- | source3/modules/vfs_cap.c | 23 |
1 files changed, 18 insertions, 5 deletions
diff --git a/source3/modules/vfs_cap.c b/source3/modules/vfs_cap.c index cf3bb94498c..cfb02cbdf62 100644 --- a/source3/modules/vfs_cap.c +++ b/source3/modules/vfs_cap.c @@ -56,17 +56,30 @@ static uint64_t cap_disk_free(vfs_handle_struct *handle, bsize, dfree, dsize); } -static int cap_get_quota(vfs_handle_struct *handle, const char *path, - enum SMB_QUOTA_TYPE qtype, unid_t id, - SMB_DISK_QUOTA *dq) +static int cap_get_quota(vfs_handle_struct *handle, + const struct smb_filename *smb_fname, + enum SMB_QUOTA_TYPE qtype, + unid_t id, + SMB_DISK_QUOTA *dq) { - char *cappath = capencode(talloc_tos(), path); + char *cappath = capencode(talloc_tos(), smb_fname->base_name); + struct smb_filename *cap_smb_fname = NULL; if (!cappath) { errno = ENOMEM; return -1; } - return SMB_VFS_NEXT_GET_QUOTA(handle, cappath, qtype, id, dq); + cap_smb_fname = synthetic_smb_fname(talloc_tos(), + cappath, + NULL, + NULL, + smb_fname->flags); + if (cap_smb_fname == NULL) { + TALLOC_FREE(cappath); + errno = ENOMEM; + return -1; + } + return SMB_VFS_NEXT_GET_QUOTA(handle, cap_smb_fname, qtype, id, dq); } static DIR *cap_opendir(vfs_handle_struct *handle, |