From e386ddb6a7ab6f4e0dec3f7d44431e2cb8b136da Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Thu, 22 Aug 2019 13:51:28 -0700 Subject: [PATCH] s3: VFS: vfs_ceph. Implement readlinkat(). MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Currently identical to readlink(). Signed-off-by: Jeremy Allison Reviewed-by: Ralph Böhme --- source3/modules/vfs_ceph.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/source3/modules/vfs_ceph.c b/source3/modules/vfs_ceph.c index 4ccadae0e5c..30a5525f4b5 100644 --- a/source3/modules/vfs_ceph.c +++ b/source3/modules/vfs_ceph.c @@ -1156,6 +1156,23 @@ static int cephwrap_readlink(struct vfs_handle_struct *handle, WRAP_RETURN(result); } +static int cephwrap_readlinkat(struct vfs_handle_struct *handle, + files_struct *dirfsp, + const struct smb_filename *smb_fname, + char *buf, + size_t bufsiz) +{ + int result = -1; + DBG_DEBUG("[CEPH] readlink(%p, %s, %p, %llu)\n", handle, + smb_fname->base_name, buf, llu(bufsiz)); + + SMB_ASSERT(dirfsp == dirfsp->conn->cwd_fsp); + + result = ceph_readlink(handle->data, smb_fname->base_name, buf, bufsiz); + DBG_DEBUG("[CEPH] readlink(...) = %d\n", result); + WRAP_RETURN(result); +} + static int cephwrap_linkat(struct vfs_handle_struct *handle, files_struct *srcfsp, const struct smb_filename *old_smb_fname, @@ -1460,6 +1477,7 @@ static struct vfs_fn_pointers ceph_fns = { .getlock_fn = cephwrap_getlock, .symlink_fn = cephwrap_symlink, .readlink_fn = cephwrap_readlink, + .readlinkat_fn = cephwrap_readlinkat, .linkat_fn = cephwrap_linkat, .mknodat_fn = cephwrap_mknodat, .realpath_fn = cephwrap_realpath, -- 2.11.4.GIT