From: Iain Patterson Date: Fri, 12 Feb 2010 10:51:17 +0000 (+0000) Subject: Add target UID to KRB5CCNAME when becoming. X-Git-Url: http://git.iain.cx/?a=commitdiff_plain;h=7b6dd8b88884f5a74776de2a4af4142b11ee6fef;p=profile.git Add target UID to KRB5CCNAME when becoming. --- diff --git a/.profile.d/krb5.bashrc b/.profile.d/krb5.bashrc index 973101f..979bd71 100644 --- a/.profile.d/krb5.bashrc +++ b/.profile.d/krb5.bashrc @@ -59,7 +59,7 @@ if [ -z "$OLDSOLARIS" -a -z "$OLDREDHAT" ]; then # Don't break permissions of inherited cache under sudo. cache="${KRB5CCNAME##FILE:}" if [ ! "$cache" = "$KRB5CCNAME" ]; then - ccname="${cache/_$SUDO_UID/_sudo_$SUDO_UID}_$$" + ccname="${cache/_$SUDO_UID/_${UID}_sudo_$SUDO_UID}_$$" export KRB5CCNAME="FILE:$ccname" if cat "$cache" > "$ccname" 2>/dev/null; then klist -s 2>/dev/null && kinit -R 2>/dev/null || kinit $PRINCIPAL