The current ticket cache may be a collection. Look for the DIR: prefix
as well as FILE:.
if [ -n "$PRINCIPAL" ]; then
echo >&3 "PRINCIPAL='$PRINCIPAL'"
if [ $kerberos = 1 ]; then
- ccname=$(klist 2>/dev/null | sed -n 's/^Ticket cache: FILE://p')
+ ccname=$(klist 2>/dev/null | sed -n 's/^Ticket cache: [DF]I[LR][E:]://p')
if [ -f "$ccname" ]; then
echo >&3 "export KRB5CCNAME='$KRB5CCNAME'"
openssl=$(find_working openssl)