diff options
author | Lyndon Brown <jnqnfe@gmail.com> | 2020-03-06 00:53:44 +0000 |
---|---|---|
committer | Raphaƫl Hertzog <hertzog@debian.org> | 2020-03-09 10:51:11 +0000 |
commit | 37f0432e983f11e3bfa29842edd42ad66dd1a25e (patch) | |
tree | 23875028e30b2017f65076253ef3b4d0479b7f5b | |
parent | 7624527d7709d8cceb6e2507903e413ffb7dabc0 (diff) | |
download | vyos-live-build-37f0432e983f11e3bfa29842edd42ad66dd1a25e.tar.gz vyos-live-build-37f0432e983f11e3bfa29842edd42ad66dd1a25e.zip |
fix inadequate chroot_archives validation
commit d74f2102a0849838eb4e15950b01d49f9f79392f added a validation check
to chroot_archives for its 'pass' parameter. this was based upon finding
an instance where the wrong value was being submitted to the script and
wanting to ensure such mistakes would be caught.
unfortunately it seems that I made a mistake in misremembering the facts
surrounding the latter issue when constructing the validation check and
failed to double check with testing until it was already merged. a
correction is needed. the set of valid values is not limited to only
'source|binary' but actually 'source|binary|chroot'. I'd misremembered
'chroot' as being a completely invalid value.
-rwxr-xr-x | scripts/build/chroot_archives | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/scripts/build/chroot_archives b/scripts/build/chroot_archives index 8f83906f0..472b76785 100755 --- a/scripts/build/chroot_archives +++ b/scripts/build/chroot_archives @@ -16,12 +16,13 @@ set -e # Setting static variables DESCRIPTION="Manage /etc/apt/sources.list" HELP="" -USAGE="${PROGRAM} {source|binary} {install|remove} [--force]" +USAGE="${PROGRAM} {source|binary|chroot} {install|remove} [--force]" _PASS="${1}" shift -if [ "${_PASS}" != "binary" ] && [ "${_PASS}" != "source" ]; then +if [ "${_PASS}" != "binary" ] && [ "${_PASS}" != "chroot" ] && [ "${_PASS}" != "source" ] +then Usage fi |