#!/bin/sh
/bin/echo -n "frobbing tickets... "
# do splefty things with ticket files...
# move the tickets to /tmp/tkt${UID}.null so that we can use the cool
# aliases to swap ticket files.  Reset $KRBTKFILE accordingly.
if [ ${TKTFROB=f} = "f" ];then
  TKTFROB=t;export TKTFROB
  UID=`/bin/grep $USER /etc/passwd|/bin/awk -F: '{print $3}'`;export UID
  if [ ${KRBTKFILE-.} = "." ];then
    KRBTKFILE=/tmp/tkt${UID};export KRBTKFILE
  fi
  if [ -r $KRBTKFILE ];then
    /bin/mv $KRBTKFILE /tmp/tkt${UID}.null
    /bin/mv ${KRBTKFILE}.shm /tmp/tkt${UID}.null.shm>/dev/null 2>&1
    KRBTKFILE=/tmp/tkt${UID}.null;export KRBTKFILE
  fi
fi
