]> snippets.scripts.mit.edu Git - Scripts/git/.git/commitdiff
kdo: Upstream krb5 now supports kswitch master
authorQuentin Smith <quentin@mit.edu>
Fri, 17 Jan 2020 04:32:55 +0000 (23:32 -0500)
committerQuentin Smith <quentin@mit.edu>
Fri, 17 Jan 2020 04:32:55 +0000 (23:32 -0500)
kerberos/kdo

index a043f52dde55cd23d1fbbe9d1dd6aa4711f0262e..b171c4b6d6b0d3de06da39dbf819f6beaeb53a7c 100644 (file)
@@ -40,8 +40,8 @@
 # CONFIGURATION
 kdo_args=(-l15m -r60m -F)
 
-# CC interface for OS X
-if [ "Darwin" = "$(uname)" ]; then
+# CC interface for OS X or modern MIT krb5
+if type kswitch &>/dev/null; then
     kcaches () {
         klist -A | perl -ne '$cache = $1 if /^(?:Kerberos 5 ticket|Ticket|Credentials) cache: '\''?(.*)'\''?/; print "$1 $cache\n" if /^(?:Default p|P)rincipal: (.*)$/'
     }