From 7b6dd8b88884f5a74776de2a4af4142b11ee6fef Mon Sep 17 00:00:00 2001 From: Iain Patterson Date: Fri, 12 Feb 2010 10:51:17 +0000 Subject: [PATCH] Add target UID to KRB5CCNAME when becoming. --- .profile.d/krb5.bashrc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- 2.20.1