summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKir Kolyshkin <kolyshkin@gmail.com>2022-08-31 10:22:37 -0700
committerTom Hromatka <tom.hromatka@oracle.com>2022-09-21 15:25:54 -0600
commit9fd0aef44dc103281d1048900a04ac8231fb4d52 (patch)
treef6dfae2eed61ce1836e929dfcf2fec4a2f662972
parentb86e5a337fdbff13c018c4ea92a0691d779b1391 (diff)
downloadlibseccomp-9fd0aef44dc103281d1048900a04ac8231fb4d52.tar.gz
arch: require arch-syscall-dump from arch-syscall-validate
The arch-syscall-dump is almost always used from arch-syscall-validate (the only exception I found is when -c and -l are given), so it makes sense to check that it's available beforehand. Without this patch, when arch-syscall-dump is not present, the script produces lots of output with a few errors about the missing ./arch-syscall-dump hidden in the middle of it. To keep things simple, we require arch-syscall-dump even when it is not going to be used. Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com> Acked-by: Paul Moore <paul@paul-moore.com> Signed-off-by: Tom Hromatka <tom.hromatka@oracle.com>
-rwxr-xr-xsrc/arch-syscall-validate9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/arch-syscall-validate b/src/arch-syscall-validate
index 6773b03..082ac56 100755
--- a/src/arch-syscall-validate
+++ b/src/arch-syscall-validate
@@ -845,10 +845,6 @@ while getopts "a:c:slh" opt; do
opt_lib=0
;;
l)
- if [[ ! -x $LIB_SYS_DUMP ]]; then
- echo "error: \"$LIB_SYS_DUMP\" is not present"
- exit 1
- fi
opt_sys=0
opt_lib=1
;;
@@ -883,6 +879,11 @@ if [[ ! -d $kernel_dir ]]; then
exit 1
fi
+if [[ ! -x "$LIB_SYS_DUMP" ]]; then
+ echo "error: \"$LIB_SYS_DUMP\" is not present"
+ exit 1
+fi
+
# generate some temp files
tmp_lib=$(mktemp -t syscall_validate_XXXXXX)
tmp_sys=$(mktemp -t syscall_validate_XXXXXX)