git.samba.org
/
obnox
/
samba-ctdb.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
s3: Fix shadow-copy module for drag&drop from a snapshot
[obnox/samba-ctdb.git]
/
source3
/
modules
/
vfs_shadow_copy2.c
diff --git
a/source3/modules/vfs_shadow_copy2.c
b/source3/modules/vfs_shadow_copy2.c
index 6199620512fd0745ef9dd7458653c9e976660150..96f0e7b821c367d542ec237cd536395105a4544a 100644
(file)
--- a/
source3/modules/vfs_shadow_copy2.c
+++ b/
source3/modules/vfs_shadow_copy2.c
@@
-406,6
+406,10
@@
static void convert_sbuf(vfs_handle_struct *handle, const char *fname, SMB_STRUC
static int shadow_copy2_rename(vfs_handle_struct *handle,
const char *oldname, const char *newname)
{
+ if (shadow_copy2_match_name(oldname, NULL)) {
+ errno = EXDEV;
+ return -1;
+ }
SHADOW2_NEXT2(RENAME, (handle, oldname, newname));
}