From: Jeremy Allison Date: Tue, 20 Aug 2019 23:50:57 +0000 (-0700) Subject: s3: VFS: vfs_ceph. Implement mknodat(). X-Git-Tag: tevent-0.10.1~212 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2aaadbdda12628258d6bd41b0277758d338cb6a2;p=thirdparty%2Fsamba.git s3: VFS: vfs_ceph. Implement mknodat(). Currently identical to mknod(). Signed-off-by: Jeremy Allison Reviewed-by: Ralph Böhme --- 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,