Jilles Tjoelker e0f5c1387d sh: Allow more scripts without #!
Austin Group bugs #1226 and #1250 changed the requirements for shell scripts
without #! (POSIX does not specify #!; this is about the shell execution
when execve(2) returns an [ENOEXEC] error).

POSIX says we shall allow execution if the initial part intended to be
parsed by the shell consists of characters and does not contain the NUL
character.  This allows concatenating a shell script (ending with exec or
exit) and a binary payload.

In order to reject common binary files such as PNG images, check that there
is a lowercase letter or expansion before the last newline before the NUL
character, in addition to the check for the newline character suggested by
POSIX.
2020-05-30 16:00:49 +00:00
..
2020-05-30 16:00:49 +00:00
2020-01-01 12:06:37 +00:00
2020-05-30 16:00:49 +00:00
2020-04-21 00:37:55 +00:00
2020-03-28 17:02:32 +00:00
2020-05-16 16:29:23 +00:00
2020-04-01 15:12:51 +00:00
2019-02-24 21:05:13 +00:00
2019-02-24 21:05:13 +00:00