]> git.ipfire.org Git - thirdparty/samba.git/commit
s3:vfs_crossrename: add back checking for errno ENOENT
authorJones Syue <jonessyue@qnap.com>
Thu, 26 Sep 2024 09:17:14 +0000 (17:17 +0800)
committerPavel Filipensky <pfilipensky@samba.org>
Tue, 17 Dec 2024 10:27:34 +0000 (10:27 +0000)
commit1a089a16c40e0b3bc5d4fcde559157cf137056c2
treeb6252a07589670be91eb2dad36f6e4597a5d1906
parent0a9adc85e77bc557bb8be12237fa31c4142dd3d5
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)

Commit 5c18f074be92 ("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>
source3/modules/vfs_crossrename.c