openat2(RESOLVE_BENEATH) via the raw syscall, gated on openat2_usable() so a * seccomp filter that traps openat2 with SIGSYS (e.g. the Android sandbox) * makes us report ENOSYS and fall back rather than killing the process. Only * the openat2 call is gated here; a plain openat() is always safe to attempt. */
| 1699 | * makes us report ENOSYS and fall back rather than killing the process. Only |
| 1700 | * the openat2 call is gated here; a plain openat() is always safe to attempt. */ |
| 1701 | static int openat2_beneath(int dirfd, const char *path, const struct open_how *how) |
| 1702 | { |
| 1703 | if (!openat2_usable()) { |
| 1704 | errno = ENOSYS; |
| 1705 | return -1; |
| 1706 | } |
| 1707 | return syscall(SYS_openat2, dirfd, path, how, sizeof *how); |
| 1708 | } |
| 1709 | |
| 1710 | static int secure_relative_open_linux(const char *basedir, const char *relpath, int flags, mode_t mode) |
| 1711 | { |
no test coverage detected