]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
sh: Test that executing various binary files is rejected
authorJilles Tjoelker <jilles@FreeBSD.org>
Mon, 30 Dec 2019 21:32:55 +0000 (21:32 +0000)
committerJilles Tjoelker <jilles@FreeBSD.org>
Sat, 30 Jan 2021 15:10:26 +0000 (16:10 +0100)
commit9b38ede3a347f9ae48d4b80878134f07ccc6845c
tree89316065a7b516196e019cdd89891412418a4286
parent6a3ad2d0a7b633bad2bb33f9c4c426dffcc91633
sh: Test that executing various binary files is rejected

If executing a file fails with an [ENOEXEC] error, the shell executes the
file as a shell script, except that this execution may instead result in an
error message if the file is binary.

Per a recent Austin Group interpretation, we will need to change this to
allow a concatenation of a shell script and a binary payload. See
Austin Group bugs #1226 and #1250.

MFC after: 1 week

(cherry picked from commit 2a55bade0ed3e08a8c4f922df0ecf67d1ee32f53)
bin/sh/tests/execution/Makefile
bin/sh/tests/execution/shellproc2.0 [new file with mode: 0644]
bin/sh/tests/execution/shellproc3.0 [new file with mode: 0644]
bin/sh/tests/execution/shellproc4.0 [new file with mode: 0644]
bin/sh/tests/execution/shellproc5.0 [new file with mode: 0644]