1994-09-30 14:50:09 +00:00
|
|
|
/*
|
1995-05-30 06:41:30 +00:00
|
|
|
* Copyright 1988 by the Massachusetts Institute of Technology.
|
1994-09-30 14:50:09 +00:00
|
|
|
* For copying and distribution information, please see the file
|
1995-05-30 06:41:30 +00:00
|
|
|
* <Copyright.MIT>.
|
1994-09-30 14:50:09 +00:00
|
|
|
*
|
1997-01-14 07:20:47 +00:00
|
|
|
* from: $Header: /home/ncvs/src/eBones/lib/libkdb/print_princ.c,v 1.4 1995/09/07 21:37:13 markm Exp $
|
|
|
|
* $FreeBSD$
|
1994-09-30 14:50:09 +00:00
|
|
|
*/
|
|
|
|
|
1995-08-25 22:52:32 +00:00
|
|
|
#if 0
|
1994-09-30 14:50:09 +00:00
|
|
|
#ifndef lint
|
|
|
|
static char rcsid[] =
|
1997-01-14 07:20:47 +00:00
|
|
|
"$FreeBSD$";
|
1994-09-30 14:50:09 +00:00
|
|
|
#endif lint
|
1995-08-25 22:52:32 +00:00
|
|
|
#endif
|
1994-09-30 14:50:09 +00:00
|
|
|
|
|
|
|
#include <stdio.h>
|
1995-09-07 21:39:00 +00:00
|
|
|
#include <time.h>
|
1994-09-30 14:50:09 +00:00
|
|
|
#include <sys/types.h>
|
|
|
|
#include <sys/time.h>
|
|
|
|
#include <strings.h>
|
|
|
|
#include <krb.h>
|
|
|
|
#include <krb_db.h>
|
|
|
|
|
|
|
|
extern int debug;
|
|
|
|
|
|
|
|
long kerb_debug;
|
1995-08-25 22:52:32 +00:00
|
|
|
static struct tm *time_p;
|
1994-09-30 14:50:09 +00:00
|
|
|
|
1995-09-07 21:39:00 +00:00
|
|
|
void
|
|
|
|
krb_print_principal(a_n)
|
|
|
|
Principal *a_n;
|
1994-09-30 14:50:09 +00:00
|
|
|
{
|
|
|
|
/* run-time database does not contain string versions */
|
|
|
|
time_p = 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,
|
1995-08-25 22:52:32 +00:00
|
|
|
"\n\tkey_ver %d k_low 0x%08lx k_high 0x%08lx akv %d exists %d\n",
|
1994-09-30 14:50:09 +00:00
|
|
|
a_n->key_version, a_n->key_low, a_n->key_high,
|
1995-08-25 22:52:32 +00:00
|
|
|
a_n->kdc_key_ver, (int)a_n->old);
|
1994-09-30 14:50:09 +00:00
|
|
|
|
|
|
|
fflush(stderr);
|
|
|
|
}
|