Files
systemd/src/coverage
khromenokroman b43258ee75 tree-wide: use execvp_safe() instead of execvp(), execvpe() and execlp()
glibc's execvp() and friends run the file via /bin/sh when execve() fails
with ENOEXEC, hence a truncated or otherwise broken binary is run as an
empty shell script and exits successfully. Let's use execvp_safe() and
execvpe_safe() everywhere, so that such binaries fail with ENOEXEC.

Note that this means that scripts without a shebang line are not run via
/bin/sh anymore, e.g. when specified via $SYSTEMD_EDITOR or $PAGER or
passed to systemd-run. Also, relative and empty $PATH entries are
ignored, as find_executable() always did. musl's execvp() doesn't run
scripts via /bin/sh either.
2026-11-02 07:32:23 +09:00
..