summaryrefslogtreecommitdiff
path: root/kerberosIV/kdb/print_princ.c
diff options
context:
space:
mode:
Diffstat (limited to 'kerberosIV/kdb/print_princ.c')
-rw-r--r--kerberosIV/kdb/print_princ.c48
1 files changed, 48 insertions, 0 deletions
diff --git a/kerberosIV/kdb/print_princ.c b/kerberosIV/kdb/print_princ.c
new file mode 100644
index 00000000000..d846f4bcd9f
--- /dev/null
+++ b/kerberosIV/kdb/print_princ.c
@@ -0,0 +1,48 @@
+/* $Id: print_princ.c,v 1.1 1995/12/14 06:52:36 tholo Exp $ */
+
+/*-
+ * Copyright (C) 1989 by the Massachusetts Institute of Technology
+ *
+ * Export of this software from the United States of America is assumed
+ * to require a specific license from the United States Government.
+ * It is the responsibility of any person or organization contemplating
+ * export to obtain such a license before exporting.
+ *
+ * WITHIN THAT CONSTRAINT, permission to use, copy, modify, and
+ * distribute this software and its documentation for any purpose and
+ * without fee is hereby granted, provided that the above copyright
+ * notice appear in all copies and that both that copyright notice and
+ * this permission notice appear in supporting documentation, and that
+ * the name of M.I.T. not be used in advertising or publicity pertaining
+ * to distribution of the software without specific, written prior
+ * permission. M.I.T. makes no representations about the suitability of
+ * this software for any purpose. It is provided "as is" without express
+ * or implied warranty.
+ */
+
+#include "kdb_locl.h"
+
+void
+krb_print_principal(a_n)
+ Principal *a_n;
+{
+ struct tm *time_p;
+
+ /* run-time database does not contain string versions */
+ time_p = k_localtime(&(a_n->exp_date));
+
+ fprintf(stderr,
+ "\n%s %s expires %4d-%2d-%2d %2d:%2d, max_life %d*5 = %d min attr 0x%02x",
+ a_n->name, a_n->instance,
+ time_p->tm_year > 1900 ? time_p->tm_year : time_p->tm_year + 1900,
+ time_p->tm_mon + 1, time_p->tm_mday,
+ time_p->tm_hour, time_p->tm_min,
+ a_n->max_life, 5 * a_n->max_life, a_n->attributes);
+
+ fprintf(stderr,
+ "\n\tkey_ver %d k_low 0x%08lx k_high 0x%08lx akv %d exists %ld\n",
+ a_n->key_version, (long)a_n->key_low, (long)a_n->key_high,
+ a_n->kdc_key_ver, (long)a_n->old);
+
+ fflush(stderr);
+}