From: Jeremy Allison Date: Thu, 22 Aug 2019 21:22:55 +0000 (-0700) Subject: s3: VFS: vfs_glusterfs. Implement readlinkat(). X-Git-Tag: tevent-0.10.1~179 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4874730c3052668a1bc8b8939ee557a77387f1f0;p=thirdparty%2Fsamba.git s3: VFS: vfs_glusterfs. Implement readlinkat(). Currently identical to readlink(). Signed-off-by: Jeremy Allison Reviewed-by: Ralph Böhme --- diff --git a/source3/modules/vfs_glusterfs.c b/source3/modules/vfs_glusterfs.c index 66a3e9d9db8..6595a831ad6 100644 --- a/source3/modules/vfs_glusterfs.c +++ b/source3/modules/vfs_glusterfs.c @@ -1687,6 +1687,22 @@ static int vfs_gluster_readlink(struct vfs_handle_struct *handle, return ret; } +static int vfs_gluster_readlinkat(struct vfs_handle_struct *handle, + files_struct *dirfsp, + const struct smb_filename *smb_fname, + char *buf, + size_t bufsiz) +{ + int ret; + + START_PROFILE(syscall_readlinkat); + SMB_ASSERT(dirfsp == dirfsp->conn->cwd_fsp); + ret = glfs_readlink(handle->data, smb_fname->base_name, buf, bufsiz); + END_PROFILE(syscall_readlinkat); + + return ret; +} + static int vfs_gluster_linkat(struct vfs_handle_struct *handle, files_struct *srcfsp, const struct smb_filename *old_smb_fname, @@ -1932,6 +1948,7 @@ static struct vfs_fn_pointers glusterfs_fns = { .getlock_fn = vfs_gluster_getlock, .symlink_fn = vfs_gluster_symlink, .readlink_fn = vfs_gluster_readlink, + .readlinkat_fn = vfs_gluster_readlinkat, .linkat_fn = vfs_gluster_linkat, .mknodat_fn = vfs_gluster_mknodat, .realpath_fn = vfs_gluster_realpath,