Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

selftests/exec: Convert remaining /bin/sh to /bin/bash

As was intended with commit 17107429947b ("selftests/exec: Perform script
checks with /bin/bash"), convert the other instance of /bin/sh to
/bin/bash. It appears that at least Debian Bookworm's /bin/sh (dash)
does not conform to POSIX's "return 127 when script not found"
requirement.

Fixes: 17107429947b ("selftests/exec: Perform script checks with /bin/bash")
Reported-by: Muhammad Usama Anjum <usama.anjum@collabora.com>
Closes: https://lore.kernel.org/lkml/02c8bf8e-1934-44ab-a886-e065b37366a7@collabora.com/
Signed-off-by: Kees Cook <keescook@chromium.org>

+2 -2
+2 -2
tools/testing/selftests/exec/Makefile
··· 19 19 20 20 $(OUTPUT)/subdir: 21 21 mkdir -p $@ 22 - $(OUTPUT)/script: 23 - echo '#!/bin/sh' > $@ 22 + $(OUTPUT)/script: Makefile 23 + echo '#!/bin/bash' > $@ 24 24 echo 'exit $$*' >> $@ 25 25 chmod +x $@ 26 26 $(OUTPUT)/execveat.symlink: $(OUTPUT)/execveat