diff options
author | Jeremy Allison <jra@samba.org> | 2017-06-30 11:32:59 -0700 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2017-07-01 03:07:11 +0200 |
commit | c29438f8238c3cf436e126c99f6f9f6bcca4efaf (patch) | |
tree | cff5f451fe83b9189eca4ca8f2c9530a8bfc2fa9 /source3/modules/vfs_glusterfs.c | |
parent | bd9285b19741128bae501b721d9e63dd9a9bd833 (diff) | |
download | samba-c29438f8238c3cf436e126c99f6f9f6bcca4efaf.tar.gz |
s3: VFS: Change SMB_VFS_REALPATH to take and return struct smb_filename * instead of 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_glusterfs.c')
-rw-r--r-- | source3/modules/vfs_glusterfs.c | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/source3/modules/vfs_glusterfs.c b/source3/modules/vfs_glusterfs.c index 52539b36fd9..188463f6d51 100644 --- a/source3/modules/vfs_glusterfs.c +++ b/source3/modules/vfs_glusterfs.c @@ -1149,10 +1149,12 @@ static int vfs_gluster_fallocate(struct vfs_handle_struct *handle, return -1; } -static char *vfs_gluster_realpath(struct vfs_handle_struct *handle, - const char *path) +static struct smb_filename *vfs_gluster_realpath(struct vfs_handle_struct *handle, + TALLOC_CTX *ctx, + const struct smb_filename *smb_fname) { char *result = NULL; + struct smb_filename *result_fname = NULL; char *resolved_path = SMB_MALLOC_ARRAY(char, PATH_MAX+1); if (resolved_path == NULL) { @@ -1160,12 +1162,15 @@ static char *vfs_gluster_realpath(struct vfs_handle_struct *handle, return NULL; } - result = glfs_realpath(handle->data, path, resolved_path); - if (result == NULL) { - SAFE_FREE(resolved_path); + result = glfs_realpath(handle->data, + smb_fname->base_name, + resolved_path); + if (result != NULL) { + result_fname = synthetic_smb_fname(ctx, result, NULL, NULL, 0); } - return result; + SAFE_FREE(resolved_path); + return result_fname; } static bool vfs_gluster_lock(struct vfs_handle_struct *handle, |