summaryrefslogtreecommitdiff
path: root/source3/modules/vfs_glusterfs.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2017-06-29 14:32:47 -0700
committerJeremy Allison <jra@samba.org>2017-07-01 03:07:11 +0200
commitbd9285b19741128bae501b721d9e63dd9a9bd833 (patch)
tree7fd477f84fc8d1e072e3acb550157ab2da68b597 /source3/modules/vfs_glusterfs.c
parent6acb0d6ca08d72f776d3ba9dc934261a481aa737 (diff)
downloadsamba-bd9285b19741128bae501b721d9e63dd9a9bd833.tar.gz
s3: VFS: Change SMB_VFS_GETWD to 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.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/source3/modules/vfs_glusterfs.c b/source3/modules/vfs_glusterfs.c
index 833f093ac42..52539b36fd9 100644
--- a/source3/modules/vfs_glusterfs.c
+++ b/source3/modules/vfs_glusterfs.c
@@ -1076,10 +1076,12 @@ static int vfs_gluster_chdir(struct vfs_handle_struct *handle,
return glfs_chdir(handle->data, smb_fname->base_name);
}
-static char *vfs_gluster_getwd(struct vfs_handle_struct *handle)
+static struct smb_filename *vfs_gluster_getwd(struct vfs_handle_struct *handle,
+ TALLOC_CTX *ctx)
{
char *cwd;
char *ret;
+ struct smb_filename *smb_fname = NULL;
cwd = SMB_CALLOC_ARRAY(char, PATH_MAX);
if (cwd == NULL) {
@@ -1090,7 +1092,13 @@ static char *vfs_gluster_getwd(struct vfs_handle_struct *handle)
if (ret == 0) {
free(cwd);
}
- return ret;
+ smb_fname = synthetic_smb_fname(ctx,
+ ret,
+ NULL,
+ NULL,
+ 0);
+ free(cwd);
+ return smb_fname;
}
static int vfs_gluster_ntimes(struct vfs_handle_struct *handle,