1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-25 23:21:54 +03:00

r23107: Fix renames on file descriptors that are supposed to overwrite the

target. Needs merging for 3.0.25a (sorry).
Jeremy.
This commit is contained in:
Jeremy Allison 2007-05-24 01:57:02 +00:00 committed by Gerald (Jerry) Carter
parent b98175440b
commit a56bce3d44

View File

@ -4245,9 +4245,10 @@ NTSTATUS rename_internals_fsp(connection_struct *conn, files_struct *fsp, pstrin
ZERO_STRUCT(sbuf);
status = unix_convert(conn, newname, False, newname_last_component, &sbuf);
/* We expect this to be NT_STATUS_OBJECT_PATH_NOT_FOUND */
if (!NT_STATUS_EQUAL(NT_STATUS_OBJECT_PATH_NOT_FOUND, status)) {
return NT_STATUS_OBJECT_NAME_COLLISION;
/* If an error we expect this to be NT_STATUS_OBJECT_PATH_NOT_FOUND */
if (!NT_STATUS_IS_OK(status) && !NT_STATUS_EQUAL(NT_STATUS_OBJECT_PATH_NOT_FOUND, status)) {
return status;
}