mirror of
https://github.com/samba-team/samba.git
synced 2024-12-22 13:34:15 +03:00
s3:vfs_crossrename: add back checking for errno ENOENT
strace gives a clue: samba try to remove 'file.txt' in the dst folder but actually it is not existed yet, and got an errno = ENOENT, renameat(32, "file.txt", 31, "file.txt") = -1 EXDEV (Invalid cross-device link) unlinkat(31, "file.txt", 0) = -1 ENOENT (No such file or directory) Commit5c18f074be
("s3: VFS: crossrename. Use real dirfsp for SMB_VFS_RENAMEAT()") seems unintentionally removed errno ENOENT checking, so add it back could address 1st issue. BUG: https://bugzilla.samba.org/show_bug.cgi?id=15724 Signed-off-by: Jones Syue <jonessyue@qnap.com> Reviewed-by: Ralph Boehme <slow@samba.org> (cherry picked from commit1a089a16c4
)
This commit is contained in:
parent
fac7288aff
commit
f1e28919ae
@ -85,7 +85,7 @@ static NTSTATUS copy_reg(vfs_handle_struct *handle,
|
||||
dstfsp,
|
||||
dest,
|
||||
0);
|
||||
if (ret == -1) {
|
||||
if (ret == -1 && errno != ENOENT) {
|
||||
status = map_nt_error_from_unix(errno);
|
||||
goto out;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user