[PATCH] posix: Fix posix_spawnpi to not execute invalid binaries in non compat mode (BZ#23264)
Florian Weimer
fweimer@redhat.com
Wed Jun 6 18:20:00 GMT 2018
On 06/06/2018 08:11 PM, Adhemerval Zanella wrote:
> Current posix_spawnp implementation wrongly tries to execute invalid
> binaries (for instance script without shebang) as a shell script in
> non compat mode. It was a regression introduced by
> 9ff72da471a509a8c19791efe469f47fa6977410 when __spawni started to use
> __execvpe instead of __execve (glibc __execvpe try to execute ENOEXEC
> as shell script regardless).
>
> This patch fixes it by using an internal symbol (__execvpex) with the
> faulty semantic (since compat mode is handled by spawni.c itself).
Why doesn't this need a new compatibility symbol, similar to the
previously attempted change?
Thanks,
Florian
More information about the Libc-alpha
mailing list