From: Iain Patterson Date: Wed, 13 Jan 2010 18:00:19 +0000 (+0000) Subject: Don't leave credentials laying around after sudo. X-Git-Url: http://git.iain.cx/?p=profile.git;a=commitdiff_plain;h=9c823cc6aa977f457e435228587fb7a3eb102018 Don't leave credentials laying around after sudo. Add kdestroy to EXIT trap. --- diff --git a/.profile.d/krb5.bashrc b/.profile.d/krb5.bashrc index 3bf40eb..b5e50fb 100644 --- a/.profile.d/krb5.bashrc +++ b/.profile.d/krb5.bashrc @@ -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