summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2019-08-14 11:32:30 -0700
committerJeremy Allison <jra@samba.org>2019-08-20 21:09:28 +0000
commit7d2ba253adaa3c6a57bd7048498e91a1ee0db712 (patch)
treee4dbc7d1cca57ebd2317379d634f28ed87047560 /source3
parent648e771a61d2d327ed3fe0f3a4eb0837a714b280 (diff)
downloadsamba-7d2ba253adaa3c6a57bd7048498e91a1ee0db712.tar.gz
s3: VFS: vfs_ceph. Implement linkat().
Currently identical to link(). Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Ralph Böhme <slow@samba.org>
Diffstat (limited to 'source3')
-rw-r--r--source3/modules/vfs_ceph.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/source3/modules/vfs_ceph.c b/source3/modules/vfs_ceph.c
index 0a181327d27..7aaa8e3aa24 100644
--- a/source3/modules/vfs_ceph.c
+++ b/source3/modules/vfs_ceph.c
@@ -1171,6 +1171,28 @@ static int cephwrap_link(struct vfs_handle_struct *handle,
WRAP_RETURN(result);
}
+static int cephwrap_linkat(struct vfs_handle_struct *handle,
+ files_struct *srcfsp,
+ const struct smb_filename *old_smb_fname,
+ files_struct *dstfsp,
+ const struct smb_filename *new_smb_fname,
+ int flags)
+{
+ int result = -1;
+ DBG_DEBUG("[CEPH] link(%p, %s, %s)\n", handle,
+ old_smb_fname->base_name,
+ new_smb_fname->base_name);
+
+ SMB_ASSERT(srcfsp == srcfsp->conn->cwd_fsp);
+ SMB_ASSERT(dstfsp == dstfsp->conn->cwd_fsp);
+
+ result = ceph_link(handle->data,
+ old_smb_fname->base_name,
+ new_smb_fname->base_name);
+ DBG_DEBUG("[CEPH] link(...) = %d\n", result);
+ WRAP_RETURN(result);
+}
+
static int cephwrap_mknod(struct vfs_handle_struct *handle,
const struct smb_filename *smb_fname,
mode_t mode,
@@ -1452,6 +1474,7 @@ static struct vfs_fn_pointers ceph_fns = {
.symlink_fn = cephwrap_symlink,
.readlink_fn = cephwrap_readlink,
.link_fn = cephwrap_link,
+ .linkat_fn = cephwrap_linkat,
.mknod_fn = cephwrap_mknod,
.realpath_fn = cephwrap_realpath,
.chflags_fn = cephwrap_chflags,