From 5cb539d8adedadee2089edd334ffc8c0bd3e4c77 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Mon, 12 Aug 2019 10:34:37 -0700 Subject: [PATCH] s3: VFS: vfs_default. Convert underlying system call to renameat(). Signed-off-by: Jeremy Allison Reviewed-by: Ralph Boehme Autobuild-User(master): Jeremy Allison Autobuild-Date(master): Fri Aug 16 21:10:14 UTC 2019 on sn-devel-184 --- source3/modules/vfs_default.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/source3/modules/vfs_default.c b/source3/modules/vfs_default.c index 3ef94d26b60..a2b6bf6e669 100644 --- a/source3/modules/vfs_default.c +++ b/source3/modules/vfs_default.c @@ -1077,15 +1077,15 @@ static int vfswrap_renameat(vfs_handle_struct *handle, START_PROFILE(syscall_renameat); - SMB_ASSERT(srcfsp->fh->fd == AT_FDCWD); - SMB_ASSERT(dstfsp->fh->fd == AT_FDCWD); - if (smb_fname_src->stream_name || smb_fname_dst->stream_name) { errno = ENOENT; goto out; } - result = rename(smb_fname_src->base_name, smb_fname_dst->base_name); + result = renameat(srcfsp->fh->fd, + smb_fname_src->base_name, + dstfsp->fh->fd, + smb_fname_dst->base_name); out: END_PROFILE(syscall_renameat); -- 2.47.3