From a05dd9f1aa349a0d1164ca63453b18c81cdb973b Mon Sep 17 00:00:00 2001 From: Martin Zobel-Helas Date: Tue, 13 Apr 2010 18:40:12 +0200 Subject: [PATCH] do proper input validation With the current code APTCMD was parsed for the valid subcomands, but if it was invalid, it just printed it but worked nevertheless. Now we exit if the subcommand is invalid. Signed-off-by: Martin Zobel-Helas --- apt-in-chroot | 1 + 1 file changed, 1 insertion(+) diff --git a/apt-in-chroot b/apt-in-chroot index 279b95f..f1c7201 100755 --- a/apt-in-chroot +++ b/apt-in-chroot @@ -53,6 +53,7 @@ install|remove|purge|build-dep) ;; *) echo "$APTCMD is not a valid apt sub-command" + exit 1 ;; esac -- 2.30.2