1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-28 01:58:17 +03:00

smbd: Don't mask open error if fstatat() fails

Bug: https://bugzilla.samba.org/show_bug.cgi?id=15402
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>

Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Mon Jun 26 16:53:21 UTC 2023 on atb-devel-224
This commit is contained in:
Volker Lendecke 2023-06-26 13:17:44 +02:00
parent 13d199bea0
commit de2738fb9a
2 changed files with 9 additions and 1 deletions

View File

@ -1 +0,0 @@
^samba3.blackbox.rofs_error.*

View File

@ -780,6 +780,15 @@ again:
smb_fname_rel,
&fsp->fsp_name->st,
AT_SYMLINK_NOFOLLOW);
if (ret == -1) {
/*
* Keep the original error. Otherwise we would
* mask for example EROFS for open(O_CREAT),
* turning it into ENOENT.
*/
goto out;
}
} else {
ret = SMB_VFS_FSTAT(fsp, &fsp->fsp_name->st);
}