linux-yocto/scripts/selinux
Tim Schumacher ed68a544b9 selinux: Chain up tool resolving errors in install_policy.sh
[ Upstream commit 6ae0042f4d ]

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 <tim.schumacher1@huawei.com>
Signed-off-by: Paul Moore <paul@paul-moore.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2025-04-10 14:31:57 +02:00
..
genheaders kbuild: introduce hostprogs-always-y and userprogs-always-y 2020-08-10 01:32:59 +09:00
mdp scripts/selinux,selinux: update mdp to enable policy capabilities 2020-08-17 20:42:00 -04:00
install_policy.sh selinux: Chain up tool resolving errors in install_policy.sh 2025-04-10 14:31:57 +02:00
Makefile treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
README

Please see Documentation/admin-guide/LSM/SELinux.rst for information on installing a dummy SELinux policy.