mirror of
https://github.com/samba-team/samba.git
synced 2024-12-25 23:21:54 +03:00
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.
This commit is contained in:
parent
d49d203279
commit
1c1a842071
@ -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_src,
|
||||||
const struct smb_filename *smb_fname_dst)
|
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,
|
SHADOW2_NEXT2_SMB_FNAME(RENAME,
|
||||||
(handle, smb_fname_src, smb_fname_dst));
|
(handle, smb_fname_src, smb_fname_dst));
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user