Commit f49a494
committed
*: remove broken O_RESOLVE_BENEATH fallback for Linux
On Linux, openat(2) famously does not return an error if you pass it
invalid flag bits. This was something I fixed in openat2(2) but for
backward compatibility reasons, openat(2) will always silently ignore
unknown O_* flags (which makes adding new ones quite painful).
As a result, the fallback path added by commits e1c5f0e
("t_chmod_secure: probe kernel RESOLVE_BENEATH at runtime; drop test
skip") and commit 7f60ec0 ("syscall: also use O_RESOLVE_BENEATH on
FreeBSD and MacOS") would always return sucess and could cause spurious
test failures so we can just remove it. O_RESOLVE_BENEATH will never get
added to Linux for this reason, and anyone doing so out-of-tree is just
creating a massive foot-gun so there is no need to entertain such broken
kernels.
Fixes: 7f60ec0 ("syscall: also use O_RESOLVE_BENEATH on FreeBSD and MacOS")
Fixes: e1c5f0e ("t_chmod_secure: probe kernel RESOLVE_BENEATH at runtime; drop test skip")
Signed-off-by: Aleksa Sarai <aleksa@amutable.com>1 parent c0219ca commit f49a494
2 files changed
Lines changed: 15 additions & 19 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1815 | 1815 | | |
1816 | 1816 | | |
1817 | 1817 | | |
1818 | | - | |
1819 | | - | |
1820 | | - | |
| 1818 | + | |
1821 | 1819 | | |
1822 | 1820 | | |
1823 | 1821 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | | - | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
62 | 57 | | |
63 | | - | |
64 | | - | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
65 | 63 | | |
66 | 64 | | |
67 | 65 | | |
| |||
0 commit comments