From feda579ec7b7e241708573a22d8c66e571a6cafe Mon Sep 17 00:00:00 2001 From: Alex Dehnert Date: Fri, 17 May 2013 02:31:04 -0400 Subject: [PATCH] krbroot: harden the shell settings See https://sipb.mit.edu/doc/safe-shell/ for the logic. --- krbroot | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/krbroot b/krbroot index 5f0515d..37e0429 100755 --- a/krbroot +++ b/krbroot @@ -1,5 +1,7 @@ #!/bin/sh +set -euf + usage="Usage: $0 [-i instance] [-p principal] [-a addrend] subcommand [args]" principal="$ATHENA_USER/root@ATHENA.MIT.EDU" @@ -23,7 +25,7 @@ init () { kinit -F -5 -l15m "$principal" "$@" } -case $1 in +case ${1:-} in init) shift; exec kinit -F -5 -l15m "$principal" "$@" -- 2.34.1