]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3: VFS: vfs_glusterfs. Implement readlinkat().
authorJeremy Allison <jra@samba.org>
Thu, 22 Aug 2019 21:22:55 +0000 (14:22 -0700)
committerJeremy Allison <jra@samba.org>
Fri, 23 Aug 2019 18:49:35 +0000 (18:49 +0000)
Currently identical to readlink().

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Böhme <slow@samba.org>
source3/modules/vfs_glusterfs.c

index 66a3e9d9db8c699a1fb54e5ca8e9668df4819952..6595a831ad6b6e887fd2164173a7271ff5dfcc01 100644 (file)
@@ -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,