Commit acb4562
testsuite: skip dir-symlink-basis when openat2/RESOLVE_BENEATH is absent
The issue #715 fix relies on openat2(RESOLVE_BENEATH); without it
secure_relative_open() uses the per-component fallback, which can't
follow a dir-symlink basedir, so #715 still applies. The test already
skips on the non-Linux fallback platforms by name, but Android/Termux is
a Linux kernel with openat2 blocked by seccomp, so it must skip too.
Probe openat2(RESOLVE_BENEATH) at runtime in a subprocess (so a seccomp
SIGSYS kills the child, not the test) and skip when it's unavailable.
Also handle Termux's platform.system() == 'Android'.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 863da26 commit acb4562
1 file changed
Lines changed: 32 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| 19 | + | |
19 | 20 | | |
20 | 21 | | |
21 | 22 | | |
| |||
30 | 31 | | |
31 | 32 | | |
32 | 33 | | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
33 | 65 | | |
34 | 66 | | |
35 | 67 | | |
| |||
0 commit comments