From 1c1a8420712a767df80a15e4b6fc9caa6027f145 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Thu, 16 Dec 2010 04:26:02 -0700 Subject: s3:vfs:shadow_copy2: Fix shadow-copy module for drag&drop from a snapshot We have to return NT_STATUS_NOT_SAME_DEVICE to trigger the Windows client to start a copy itself. Unbeknownst to us via the ACLs snapshots are read-only, so a rename would trigger a EACCES. Unfortunately the MacOS/X finder does not do the smart NOT_SAME_DEVICE fallback that Windows does. --- source3/modules/vfs_shadow_copy2.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'source3/modules') 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)); } -- cgit