projects
/
user
/
alex
/
software
/
my-snippets.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
krbroot: harden the shell settings
[user/alex/software/my-snippets.git]
/
krbroot
diff --git
a/krbroot
b/krbroot
index 5f0515dc01a36f6a7a8f189e90e78cfdfd3972a5..37e04294f6b2ec103a56ded9352323d54e03a6f5 100755
(executable)
--- a/
krbroot
+++ b/
krbroot
@@
-1,5
+1,7
@@
#!/bin/sh
#!/bin/sh
+set -euf
+
usage="Usage: $0 [-i instance] [-p principal] [-a addrend] subcommand [args]"
principal="$ATHENA_USER/root@ATHENA.MIT.EDU"
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" "$@"
}
kinit -F -5 -l15m "$principal" "$@"
}
-case $
1
in
+case $
{1:-}
in
init)
shift;
exec kinit -F -5 -l15m "$principal" "$@"
init)
shift;
exec kinit -F -5 -l15m "$principal" "$@"