projects
/
user
/
alex
/
software
/
my-snippets.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
db1c0d0
)
krbroot: harden the shell settings
author
Alex Dehnert
<adehnert@mit.edu>
Fri, 17 May 2013 06:31:04 +0000
(
02:31
-0400)
committer
Alex Dehnert
<adehnert@mit.edu>
Fri, 17 May 2013 06:31:04 +0000
(
02:31
-0400)
See https://sipb.mit.edu/doc/safe-shell/ for the logic.
krbroot
patch
|
blob
|
history
diff --git
a/krbroot
b/krbroot
index 5f0515dc01a36f6a7a8f189e90e78cfdfd3972a5..37e04294f6b2ec103a56ded9352323d54e03a6f5 100755
(executable)
--- 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" "$@"