]> sipb.mit.edu Git - snippets/.git/blobdiff - kerberos/kdo/bashrc
Replace kdo with the new, modular, self-documenting, potentially
[snippets/.git] / kerberos / kdo / bashrc
diff --git a/kerberos/kdo/bashrc b/kerberos/kdo/bashrc
deleted file mode 100644 (file)
index f6b5216..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-function kfindcache {
-       klist -A | grep -A1 'Kerberos 5 ticket cache' | grep -iB1 "principal: .*$1" | head -n 1 | cut -f 2 -d "'"
-}
-
-function kdo {
-       local princ="$1"
-       shift;
-       local kinit_args="-l15m -r60m -F"
-       local cache=`kfindcache "$princ"`
-       if [ -n "$cache" ] && ! (KRB5CCNAME="$cache" klist -s "$cache"); then
-               KRB5CCNAME="$cache" kdestroy
-               cache=""
-       fi
-       if [ -z "$cache" ]; then
-               local oldcache=`klist | grep 'Kerberos 5 ticket cache' | cut -f 2 -d "'"`
-               kinit $kinit_args "$princ" || return 1
-               cache=`kfindcache "$princ"`
-               kswitch -c "$oldcache"
-       fi
-       echo "Running $1 with cache $cache (for principal $princ)" >&2
-       KRB5CCNAME="$cache" "$@"
-}
-
-function krootssh {
-       kdo ${ATHENA_USER:-$USER}}/root@ATHENA.MIT.EDU ssh -o "GSSAPIDelegateCredentials no" "$@"
-}