* g_ad_tkt.c: Added support for login library to get_ad_tkt. Support is copied from...
authorAlexandra Ellwood <lxs@mit.edu>
Mon, 14 Apr 2003 22:17:10 +0000 (22:17 +0000)
committerAlexandra Ellwood <lxs@mit.edu>
Mon, 14 Apr 2003 22:17:10 +0000 (22:17 +0000)
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@15352 dc483132-0cff-0310-8789-dd5450dbe970

src/lib/krb4/ChangeLog
src/lib/krb4/g_ad_tkt.c

index 9c53ca17ba11ad82b81a3310cd26de45b3c34808..907e771c29190ca848fea8fa974fbd179d6b5429 100644 (file)
@@ -1,3 +1,10 @@
+2003-04-04  Alexandra Ellwood  <lxs@mit.edu>
+    
+    * g_ad_tkt.c: Added support for login library to get_ad_tkt.
+    Support is copied from Mac Kerberos4 library and conditionalized
+    for USE_LOGIN_LIBRARY to avoid changing get_ad_tkt's behavior for
+    non-Kerberos Login Library builds.
+
 2003-03-06  Alexandra Ellwood  <lxs@mit.edu>
 
     * CCache-glue.c: Added prototypes for deprecated functions.
index daae7515fbbe13acabc90df6f14936bf4101abfd..353fdcee5ee844e6191a7f947431b60a0f13e4ea 100644 (file)
@@ -256,6 +256,15 @@ get_ad_tkt(service, sinstance, realm, lifetime)
     size_t snamelen, sinstlen;
 
     kerror = krb_get_tf_realm(TKT_FILE, lrealm);
+#if USE_LOGIN_LIBRARY
+    if (kerror == GC_NOTKT) {
+        /* No tickets... call krb_get_cred (KLL will prompt) and try again. */
+        if ((kerror = krb_get_cred ("krbtgt", realm, realm, &cr)) == KSUCCESS) {
+            /* Now get the realm again. */
+            kerror = krb_get_tf_realm (TKT_FILE, lrealm);
+        }
+    }
+#endif
     if (kerror != KSUCCESS)
        return kerror;