diff options
Diffstat (limited to 'source4/ntvfs/posix/pvfs_rename.c')
-rw-r--r-- | source4/ntvfs/posix/pvfs_rename.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/source4/ntvfs/posix/pvfs_rename.c b/source4/ntvfs/posix/pvfs_rename.c index 89d6a0da14..6116f6c7bf 100644 --- a/source4/ntvfs/posix/pvfs_rename.c +++ b/source4/ntvfs/posix/pvfs_rename.c @@ -48,9 +48,14 @@ 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; + status = pvfs_can_delete(pvfs, name1); + if (!NT_STATUS_IS_OK(status)) { + return status; + } + + status = pvfs_can_delete(pvfs, name2); + if (!NT_STATUS_IS_OK(status)) { + return status; } if (name1->has_wildcard || name2->has_wildcard) { |