Don't leave credentials laying around after sudo.
authorIain Patterson <me@iain.cx>
Wed, 13 Jan 2010 18:00:19 +0000 (18:00 +0000)
committerIain Patterson <me@iain.cx>
Mon, 25 Jan 2010 11:03:26 +0000 (11:03 +0000)
Add kdestroy to EXIT trap.

.profile.d/krb5.bashrc

index 3bf40eb..b5e50fb 100644 (file)
@@ -63,6 +63,7 @@ if [ -z "$OLDSOLARIS" -a -z "$OLDREDHAT" ]; then
         cat "$cache" > "$ccname"
         export KRB5CCNAME="FILE:$ccname"
         klist -s 2>/dev/null && kinit -R 2>/dev/null || kinit
+        trap "kdestroy 2>/dev/null" EXIT
       fi
     fi
   fi