mirror of
https://github.com/samba-team/samba.git
synced 2025-02-04 17:47:26 +03:00
r23909: Get closer to passing the cthon tests for delete open file.
It matters how the target is open. Jeremy. (This used to be commit 0989877fd191f7c9e195dc6e45dda5fd026f09dd)
This commit is contained in:
parent
44b9493418
commit
5e3e15f754
@ -4447,10 +4447,13 @@ NTSTATUS rename_internals_fsp(connection_struct *conn, files_struct *fsp, pstrin
|
||||
return NT_STATUS_OBJECT_NAME_COLLISION;
|
||||
}
|
||||
|
||||
if (dst_exists && file_find_di_first(file_id_sbuf(&sbuf1)) != NULL) {
|
||||
if (dst_exists) {
|
||||
files_struct *dst_fsp = file_find_di_first(file_id_sbuf(&sbuf1));
|
||||
if (dst_fsp && !(dst_fsp->share_access & FILE_SHARE_DELETE)) {
|
||||
DEBUG(3, ("rename_internals_fsp: Target file open\n"));
|
||||
return NT_STATUS_ACCESS_DENIED;
|
||||
}
|
||||
}
|
||||
|
||||
/* Ensure we have a valid stat struct for the source. */
|
||||
if (fsp->fh->fd != -1) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user