sst-linux/scripts
Tim Schumacher 89f6691cae selinux: Chain up tool resolving errors in install_policy.sh
[ Upstream commit 6ae0042f4d3f331e841495eb0a3d51598e593ec2 ]

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:33:30 +02:00
..
atomic Fix up more non-executable files marked executable 2023-02-01 08:34:49 +01:00
basic
clang-tools gen_compile_commands: fix invalid escape sequence warning 2024-03-26 18:20:25 -04:00
coccinelle
dtc dt: dt-extract-compatibles: Don't follow symlinks when walking tree 2023-12-13 18:39:05 +01:00
dummy-tools
gcc-plugins gcc-plugins: Rename last_stmt() for GCC 14+ 2024-07-25 09:49:07 +02:00
gdb scripts/gdb: fix SB_* constants parsing 2024-06-16 13:41:32 +02:00
genksyms genksyms: fix memory leak when the same symbol is read from *.symref file 2025-02-21 13:49:23 +01:00
kconfig kconfig: fix memory leak in sym_warn_unmet_dep() 2025-02-21 13:49:24 +01:00
ksymoops
mod modpost: fix the missed iteration for the max bit in do_input() 2025-01-09 13:30:05 +01:00
package kbuild: rpm-pkg: define _arch conditionally 2023-09-19 12:27:58 +02:00
selinux selinux: Chain up tool resolving errors in install_policy.sh 2025-04-10 14:33:30 +02:00
tracing
.gitignore
adjust_autoksyms.sh kbuild: split the second line of *.mod into *.usyms 2022-05-08 03:16:59 +09:00
as-version.sh kbuild: Update assembler calls to use proper flags and language target 2023-06-21 16:01:03 +02:00
asn1_compiler.c ASN.1: Fix check for strdup() success 2023-04-26 14:28:44 +02:00
bin2c.c kbuild: move bin2c back to scripts/ from scripts/basic/ 2018-07-18 01:18:05 +09:00
bloat-o-meter
bootgraph.pl
bpf_doc.py scripts/bpf_doc: Use silent mode when exec make cmd 2024-04-10 16:28:21 +02:00
cc-can-link.sh
cc-version.sh Kbuild: add Rust support 2022-09-28 09:02:20 +02:00
check_extable.sh
check-local-export kbuild: rewrite check-local-export in sh/awk 2022-09-29 04:40:15 +09:00
check-sysctl-docs
checkdeclares.pl
checkincludes.pl
checkkconfigsymbols.py scripts: handle BrokenPipeError for python scripts 2023-03-17 08:50:31 +01:00
checkpatch.pl locking: Introduce __cleanup() based infrastructure 2024-02-23 09:12:51 +01:00
checkstack.pl checkstack: fix printed address 2023-12-13 18:39:19 +01:00
checksyscalls.sh
checkversion.pl
cleanfile
cleanpatch License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
coccicheck scripts: coccicheck: fix troubles on non-English builds 2021-05-18 11:09:59 +02:00
config
const_structs.checkpatch const_structs.checkpatch: add frequently used ops structs 2022-01-20 08:52:54 +02:00
decode_stacktrace.sh scripts/decode_stacktrace.sh: optionally use LLVM utilities 2024-01-20 11:50:11 +01:00
decodecode
depmod.sh depmod: handle the case of /sbin/depmod without /sbin in PATH 2021-01-01 12:26:39 -08:00
dev-needs.sh scripts/dev-needs: Add script to list device dependencies 2020-09-04 18:19:37 +02:00
diffconfig scripts: handle BrokenPipeError for python scripts 2023-03-17 08:50:31 +01:00
documentation-file-ref-check
export_report.pl
extract_xc3028.pl
extract-ikconfig
extract-module-sig.pl
extract-sys-certs.pl
extract-vmlinux
faddr2line
file-size.sh
find-unused-docs.sh
gcc-x86_32-has-stack-protector.sh kbuild: Fix '-S -c' in x86 stack protector scripts 2024-08-03 08:49:39 +02:00
gcc-x86_64-has-stack-protector.sh kbuild: Fix '-S -c' in x86 stack protector scripts 2024-08-03 08:49:39 +02:00
gen_autoksyms.sh
gen_ksymdeps.sh
gen-randstruct-seed.sh
generate_initcall_order.pl
generate_rust_analyzer.py scripts: generate_rust_analyzer: add missing macros deps 2025-03-28 21:58:58 +01:00
generate_rust_target.rs
get_abi.pl scripts/get_abi: fix source path leak 2024-01-31 16:17:01 -08:00
get_dvb_firmware
get_feat.pl
get_maintainer.pl
gfp-translate scripts: fix the gfp flags header path in gfp-translate 2023-06-28 11:12:22 +02:00
head-object-list.txt arm64: remove special treatment for the link order of head.o 2023-02-25 11:25:42 +01:00
headerdep.pl
headers_install.sh
insert-sys-cert.c
install.sh
jobserver-exec scripts/jobserver-exec: Fix a typo ("envirnoment") 2021-05-17 12:10:03 +09:00
kallsyms.c kallsyms: Reduce the memory occupied by kallsyms_seqs_of_names[] 2023-10-25 12:03:16 +02:00
Kbuild.include kbuild: remove the target in signal traps when interrupted 2022-09-29 02:00:29 +09:00
Kconfig.include kbuild: Update assembler calls to use proper flags and language target 2023-06-21 16:01:03 +02:00
kernel-doc
ld-version.sh kbuild: Make ld-version.sh more robust against version string changes 2024-07-18 13:18:44 +02:00
leaking_addresses.pl
Lindent License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
link-vmlinux.sh kbuild: fix short log for AS in link-vmlinux.sh 2024-07-11 12:47:18 +02:00
Makefile
Makefile.asm-generic kbuild: prefix $(srctree)/ to some included Makefiles 2021-03-15 19:20:48 +09:00
Makefile.build kbuild: rust: avoid creating temporary files 2024-05-17 11:56:10 +02:00
Makefile.clang
Makefile.clean
Makefile.compiler powerpc: remove checks for binutils older than 2.25 2024-01-25 15:27:18 -08:00
Makefile.debug Kbuild: add Rust support 2022-09-28 09:02:20 +02:00
Makefile.dtbinst kbuild: Install dtb files as 0644 in Makefile.dtbinst 2024-07-05 09:31:57 +02:00
Makefile.extrawarn kbuild: Move -Wenum-enum-conversion to W=2 2025-02-21 13:49:46 +01:00
Makefile.gcc-plugins
Makefile.headersinst
Makefile.host kbuild: rust: avoid creating temporary files 2024-05-17 11:56:10 +02:00
Makefile.kasan
Makefile.kcov kbuild: include scripts/Makefile.* only when relevant CONFIG is enabled 2020-08-10 01:32:59 +09:00
Makefile.kcsan
Makefile.kmsan kmsan: add KMSAN runtime core 2022-10-03 14:03:19 -07:00
Makefile.lib kbuild: switch from lz4c to lz4 for compression 2025-02-21 13:49:25 +01:00
Makefile.modfinal btf, scripts: rust: drop is_rust_module.sh 2024-05-17 11:56:17 +02:00
Makefile.modinst kbuild: modinst: Fix build error when CONFIG_MODULE_SIG_KEY is a PKCS#11 URI 2023-02-09 11:28:11 +01:00
Makefile.modpost modpost: propagate W=1 build option to modpost 2024-02-23 09:12:38 +01:00
Makefile.package
Makefile.randstruct
Makefile.ubsan
Makefile.userprogs
Makefile.vmlinux
Makefile.vmlinux_o kbuild: move modules.builtin(.modinfo) rules to Makefile.vmlinux_o 2022-10-03 03:52:58 +09:00
makelst
markup_oops.pl
min-tool-version.sh
mkcompile_h Revert "kbuild: Make scripts/compile.h when sh != bash" 2022-09-29 04:40:15 +09:00
mksysmap
mkuboot.sh
module.lds.S
modules-check.sh
nsdeps
objdiff
objdump-func scripts: Create objdump-func helper script 2022-05-12 10:08:43 -07:00
pahole-flags.sh bpf: Add --skip_encoding_btf_inconsistent_proto, --btf_gen_optimized to pahole flags for v1.25 2024-01-20 11:50:10 +01:00
pahole-version.sh
parse-maintainers.pl
patch-kernel License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
profile2linkerlist.pl License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
prune-kernel
recordmcount.c recordmcount: Fix memory leaks in the uwrite function 2023-05-24 17:32:41 +01:00
recordmcount.h
recordmcount.pl nds32: Remove the architecture 2022-03-07 13:54:59 +01:00
remove-stale-files
rust_is_available_bindgen_libclang.h
rust_is_available.sh rust: work around bindgen 0.69.0 issue 2024-08-29 17:30:32 +02:00
setlocalversion kbuild: do not quote string values in include/config/auto.conf 2022-01-08 18:03:57 +09:00
show_delta tweewide: Fix most Shebang lines 2020-12-08 23:30:04 +09:00
sign-file.c sign-file: Fix incorrect return values check 2023-12-20 17:00:19 +01:00
sorttable.c
sorttable.h scripts/sorttable: fix orc_sort_cmp() to maintain symmetry and transitivity 2025-01-17 13:34:38 +01:00
spdxcheck-test.sh
spdxcheck.py
spdxexclude scripts/spdxcheck: Exclude top-level README 2022-05-18 15:35:42 +02:00
spelling.txt scripts/spelling.txt: add more spellings to spelling.txt 2022-03-22 15:57:00 -07:00
sphinx-pre-install
split-man.pl
stackdelta
stackusage License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
subarch.include
syscallhdr.sh
syscallnr.sh
syscalltbl.sh scripts: check duplicated syscall number in syscall table 2021-07-09 04:00:39 +09:00
tags.sh scripts/tags.sh: Resolve gtags empty index generation 2023-07-05 18:27:38 +01:00
test_fortify.sh
tools-support-relr.sh
unifdef.c unifdef: use memcpy instead of strncpy 2018-11-30 14:45:01 -08:00
ver_linux
xen-hypercalls.sh
xz_wrap.sh