klog: could not create ticket file

Love lha at stacken.kth.se
Tue Jul 9 17:34:03 CEST 2002


Christopher Allen Wing <wingc at engin.umich.edu> writes:

> Maybe on Mac OS X, TKT_ROOT is not set? (try grep -r TKT_ROOT in
> /usr/kerberos/include or wherever it is on osx)

I would guess that both TKT_ROOT and krb_get_default_tkt_root are kth-ism.

> If TKT_ROOT is missing then this is the cause of the problem and this
> patch should fix it:

As as usual I can't apply a patch cleanly from Christopher so here is my
counter proposal:

--- klog.c.~1.31.~	Fri Apr 26 18:11:39 2002
+++ klog.c	Tue Jul  9 16:58:31 2002
@@ -364,13 +364,16 @@
  * use umich compat basename of ticket.
  */
 
+#ifndef TKT_ROOT
+#define TKT_ROOT "/tmp"
+#endif
+
 static const char *tktbasename[] = {
-    KLOG_TKT_ROOT,
 #if defined(HAVE_KRB_GET_DEFAULT_TKT_ROOT)
     "",
-#elif defined(TKT_ROOT)
-    TKT_ROOT,
 #endif
+    KLOG_TKT_ROOT,
+    TKT_ROOT,
     NULL
 };
 
@@ -382,7 +385,8 @@
     int fd;
 
     for (basepath = tktbasename; (base = *basepath) != NULL; ++basepath) {
-#if defined(HAVE_KRB_GET_DEFAULT_TKT_ROOT)
+#ifdef HAVE_KRB_GET_DEFAULT_TKT_ROOT
+	if (strcmp(base, "") == 0)
 	base = krb_get_default_tkt_root ();
 #endif
 	asprintf (&filename, "%s_%u_XXXXXX", base, (unsigned)getuid());


Then /tickets will work even if it compiled with a mit-krb w/o
krb_get_default_tkt_root() and TKT_ROOT.

It also assumes that the ticket root set to /tickets in krb.extra when you
use kthkrb if you like to live by the umich tradition/religion.

Love





More information about the Arla-drinkers mailing list