summaryrefslogtreecommitdiff
path: root/source4/ntvfs
diff options
context:
space:
mode:
Diffstat (limited to 'source4/ntvfs')
-rw-r--r--source4/ntvfs/posix/pvfs_rename.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/source4/ntvfs/posix/pvfs_rename.c b/source4/ntvfs/posix/pvfs_rename.c
index 80b6a510b0..89d6a0da14 100644
--- a/source4/ntvfs/posix/pvfs_rename.c
+++ b/source4/ntvfs/posix/pvfs_rename.c
@@ -48,6 +48,11 @@ NTSTATUS pvfs_rename(struct ntvfs_module_context *ntvfs,
return status;
}
+ if (pvfs_is_open(pvfs, name1) ||
+ pvfs_is_open(pvfs, name2)) {
+ return NT_STATUS_SHARING_VIOLATION;
+ }
+
if (name1->has_wildcard || name2->has_wildcard) {
DEBUG(3,("Rejecting wildcard rename '%s' -> '%s'\n",
ren->rename.in.pattern1, ren->rename.in.pattern2));