blob: b050880a36c6b975f80d39f6d8c45da907809659 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
|
$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 */
}
}
|