diff options
author | Jeremy Allison <jra@samba.org> | 2007-05-24 01:57:02 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 12:22:46 -0500 |
commit | 4aa857d875663f39740b4667fc7852a530536660 (patch) | |
tree | c2e528bfb40c374f985615cbe944d96ead3ebad0 /source3/smbd | |
parent | f5038178a9a2ad295365e54ff4e7661daf55f2df (diff) | |
download | samba-4aa857d875663f39740b4667fc7852a530536660.tar.gz samba-4aa857d875663f39740b4667fc7852a530536660.tar.bz2 samba-4aa857d875663f39740b4667fc7852a530536660.zip |
r23107: Fix renames on file descriptors that are supposed to overwrite the
target. Needs merging for 3.0.25a (sorry).
Jeremy.
(This used to be commit a56bce3d44e89b4fd7806cc5b464c7481ec0197f)
Diffstat (limited to 'source3/smbd')
-rw-r--r-- | source3/smbd/reply.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/source3/smbd/reply.c b/source3/smbd/reply.c index 98976dd39d..40311758c9 100644 --- a/source3/smbd/reply.c +++ b/source3/smbd/reply.c @@ -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; } |