Inline code from krb_save_credentials since there is none in some K4
authorPaul Park <pjpark@mit.edu>
Fri, 16 Jun 1995 21:10:43 +0000 (21:10 +0000)
committerPaul Park <pjpark@mit.edu>
Fri, 16 Jun 1995 21:10:43 +0000 (21:10 +0000)
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@6085 dc483132-0cff-0310-8789-dd5450dbe970

src/krb524/ChangeLog
src/krb524/k524init.c

index efd7c90cb489c88d01608308ffca3ab3263e7710..e63e7fe730fd12661b4c7b338a37e94509155b83 100644 (file)
@@ -1,4 +1,9 @@
 
+Fri Jun 16 17:09:09 EDT 1995   Paul Park       (pjpark@mit.edu)
+       * k524init.c - Inline code from krb_save_credentials, it doesn't
+               exist for some K4 (e.g. /usr/athena).
+
+
 Thu Jun 15 17:56:43 EDT 1995   Paul Park       (pjpark@mit.edu)
        * Makefile.in - Change explicit library names to -l<lib> form, and
                change target link line to use $(LD) and associated flags.
index 86d08b980192c48ccb706539518ecee61b9a2440..25cdafaaa3562fbc1c7a5f4332e16071b6059705 100644 (file)
@@ -127,6 +127,7 @@ int main(int argc, char **argv)
        }
      }
 
+#ifdef notdef
      /* stash ticket, session key, etc. for future use */
      if ((code = krb_save_credentials(v4creds.service, v4creds.instance,
                                      v4creds.realm, v4creds.session,
@@ -136,6 +137,23 @@ int main(int argc, char **argv)
         com_err("k524init", code, "trying to save the V4 ticket");
         exit(1);
      }
+#else  /* notdef */
+     /*
+      * krb_save_credentials() as supplied by CNS doesn't exist in the MIT
+      * Kerberos version 4.  So, we're inlining the logic here.
+      */
+     if (((code = tf_init(TKT_FILE, W_TKT_FIL)) != KSUCCESS) ||
+        ((code = tf_save_cred(v4creds.service, v4creds.instance,
+                              v4creds.realm, v4creds.session,
+                              v4creds.lifetime, v4creds.kvno,
+                              &(v4creds.ticket_st),
+                              v4creds.issue_date)))) {
+        com_err("k524init", code, "trying to save the V4 ticket");
+        exit(1);
+     }
+     else
+        (void) tf_close();
+#endif /* notdef */
 
      exit(0);
 }