summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source3/modules/vfs_shadow_copy2.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/source3/modules/vfs_shadow_copy2.c b/source3/modules/vfs_shadow_copy2.c
index 0393f30969..0f66f6a453 100644
--- a/source3/modules/vfs_shadow_copy2.c
+++ b/source3/modules/vfs_shadow_copy2.c
@@ -535,6 +535,10 @@ static int shadow_copy2_rename(vfs_handle_struct *handle,
const struct smb_filename *smb_fname_src,
const struct smb_filename *smb_fname_dst)
{
+ if (shadow_copy2_match_name(smb_fname_src->base_name, NULL)) {
+ errno = EXDEV;
+ return -1;
+ }
SHADOW2_NEXT2_SMB_FNAME(RENAME,
(handle, smb_fname_src, smb_fname_dst));
}