chiark / gitweb /
do proper input validation
authorMartin Zobel-Helas <zobel@debian.org>
Tue, 13 Apr 2010 16:40:12 +0000 (18:40 +0200)
committerMartin Zobel-Helas <zobel@debian.org>
Tue, 13 Apr 2010 16:40:12 +0000 (18:40 +0200)
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 <zobel@debian.org>
apt-in-chroot

index 279b95f9fc773b5fe93aba019ddc6216b2ab43d6..f1c720199c6ee674ff1798bf926e5ff07a5215b1 100755 (executable)
@@ -53,6 +53,7 @@ install|remove|purge|build-dep)
        ;;
 *)
        echo "$APTCMD is not a valid apt sub-command"
+       exit 1
        ;;
 esac