summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLyndon Brown <jnqnfe@gmail.com>2020-02-22 01:06:40 +0000
committerLyndon Brown <jnqnfe@gmail.com>2020-03-05 02:41:26 +0000
commitd74f2102a0849838eb4e15950b01d49f9f79392f (patch)
tree00cf05c821b819bc742454afcba4c819506d4016
parentae2012953b56c795294d869603f370e1a0ea0f90 (diff)
downloadvyos-live-build-d74f2102a0849838eb4e15950b01d49f9f79392f.tar.gz
vyos-live-build-d74f2102a0849838eb4e15950b01d49f9f79392f.zip
archives: add 'pass' param validation check
if this had already been in place then it would have caught bug #952837. Gbp-Dch: Short Closes: #952841
-rwxr-xr-xscripts/build/bootstrap_archives4
-rwxr-xr-xscripts/build/chroot_archives4
2 files changed, 8 insertions, 0 deletions
diff --git a/scripts/build/bootstrap_archives b/scripts/build/bootstrap_archives
index 2a33d67c4..e0dd1fdfc 100755
--- a/scripts/build/bootstrap_archives
+++ b/scripts/build/bootstrap_archives
@@ -24,6 +24,10 @@ then
shift
fi
+if [ "${_PASS}" != "binary" ] && [ "${_PASS}" != "source" ]; then
+ Usage
+fi
+
Arguments "${@}"
# Reading configuration files
diff --git a/scripts/build/chroot_archives b/scripts/build/chroot_archives
index 9a83d80a2..08d5e3202 100755
--- a/scripts/build/chroot_archives
+++ b/scripts/build/chroot_archives
@@ -21,6 +21,10 @@ USAGE="${PROGRAM} {source|binary} {install|remove} [--force]"
_PASS="${1}"
shift
+if [ "${_PASS}" != "binary" ] && [ "${_PASS}" != "source" ]; then
+ Usage
+fi
+
Arguments "${@}"
# Reading configuration files