summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2019-08-20 16:50:57 -0700
committerJeremy Allison <jra@samba.org>2019-08-22 18:00:33 +0000
commit2aaadbdda12628258d6bd41b0277758d338cb6a2 (patch)
tree5cc7bad3ade914727590dbfb17965fc2c8dfd8fa /source3
parent8b27087d9cfbaf9e74538ed2d987531a7ae44d67 (diff)
downloadsamba-2aaadbdda12628258d6bd41b0277758d338cb6a2.tar.gz
s3: VFS: vfs_ceph. Implement mknodat().
Currently identical to mknod(). 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.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/source3/modules/vfs_ceph.c b/source3/modules/vfs_ceph.c
index 93d5801136d..1beafba4f7b 100644
--- a/source3/modules/vfs_ceph.c
+++ b/source3/modules/vfs_ceph.c
@@ -1190,6 +1190,20 @@ static int cephwrap_mknod(struct vfs_handle_struct *handle,
WRAP_RETURN(result);
}
+static int cephwrap_mknodat(struct vfs_handle_struct *handle,
+ files_struct *dirfsp,
+ const struct smb_filename *smb_fname,
+ mode_t mode,
+ SMB_DEV_T dev)
+{
+ int result = -1;
+ DBG_DEBUG("[CEPH] mknodat(%p, %s)\n", handle, smb_fname->base_name);
+ SMB_ASSERT(dirfsp == dirfsp->conn->cwd_fsp);
+ result = ceph_mknod(handle->data, smb_fname->base_name, mode, dev);
+ DBG_DEBUG("[CEPH] mknodat(...) = %d\n", result);
+ WRAP_RETURN(result);
+}
+
/*
* This is a simple version of real-path ... a better version is needed to
* ask libceph about symbolic links.
@@ -1460,6 +1474,7 @@ static struct vfs_fn_pointers ceph_fns = {
.readlink_fn = cephwrap_readlink,
.linkat_fn = cephwrap_linkat,
.mknod_fn = cephwrap_mknod,
+ .mknodat_fn = cephwrap_mknodat,
.realpath_fn = cephwrap_realpath,
.chflags_fn = cephwrap_chflags,
.get_real_filename_fn = cephwrap_get_real_filename,