$NetBSD: patch-ag,v 1.4 2000/03/20 02:25:50 itojun Exp $ --- log-server.c- Wed May 12 20:19:26 1999 +++ log-server.c Mon Mar 20 09:47:23 2000 @@ -265,9 +265,12 @@ { struct fatal_cleanup *cu, *next_cu; static int fatal_called = 0; -#ifdef KERBEROS +#if defined(KRB4) || defined(KRB5) extern char *ticket; -#endif +#ifdef AFS + extern char *xauthfile; +#endif /* AFS */ +#endif /* KRB4 || KRB5 */ if (!fatal_called) { @@ -281,19 +284,27 @@ (unsigned long)cu->proc, (unsigned long)cu->context); (*cu->proc)(cu->context); } -#ifdef KERBEROS +#if defined(KRB4) || defined(KRB5) /* If you forwarded a ticket you get one shot for proper authentication. */ /* If tgt was passed unlink file */ if (ticket) { if (strcmp(ticket,"none")) +#ifdef KRB5 /* ticket -> FILE:path */ unlink(ticket + 5); +#else /* KRB4 */ + unlink(ticket); +#endif else ticket = NULL; } -#endif /* KERBEROS */ +#ifdef AFS + /* If local XAUTHORITY was created, remove it. */ + if (xauthfile) unlink(xauthfile); +#endif /* AFS */ +#endif /* KRB4 || KRB5 */ } }