mirror of
https://github.com/torvalds/linux.git
synced 2026-11-20 21:12:43 +00:00
Subshell evaluations are not exempt from errexit, so if a command is
not available, `which` will fail and exit the script as a whole.
This causes the helpful error messages to not be printed if they are
tacked on using a `$?` comparison.
Resolve the issue by using chains of logical operators, which are not
subject to the effects of errexit.
Fixes: e37c1877ba ("scripts/selinux: modernize mdp")
Signed-off-by: Tim Schumacher <[email protected]>
Signed-off-by: Paul Moore <[email protected]>
Please see Documentation/admin-guide/LSM/SELinux.rst for information on installing a dummy SELinux policy.