Annotation of 43BSDReno/kerberosIV/kdb/print_princ.c, revision 1.1.1.1

1.1       root        1: /*
                      2:  * $Source: /usr/src/kerberosIV/kdb/RCS/print_princ.c,v $
                      3:  * $Author: kfall $ 
                      4:  *
                      5:  * Copyright 1988 by the Massachusetts Institute of Technology. 
                      6:  *
                      7:  * For copying and distribution information, please see the file
                      8:  * <mit-copyright.h>. 
                      9:  */
                     10: 
                     11: #ifndef        lint
                     12: static char rcsid_print_principal_c[] =
                     13: "$Header: /usr/src/kerberosIV/kdb/RCS/print_princ.c,v 4.7 90/06/25 20:53:01 kfall Exp $";
                     14: #endif lint
                     15: 
                     16: #include <mit-copyright.h>
                     17: #include <stdio.h>
                     18: #include <sys/types.h>
                     19: #include <sys/time.h>
                     20: #include <strings.h>
                     21: #include <des.h>
                     22: #include <krb.h>
                     23: #include <krb_db.h>
                     24: 
                     25: extern int debug;
                     26: extern char *strncpy();
                     27: extern char *ctime();
                     28: extern struct tm *localtime();
                     29: struct tm *time_p;
                     30: 
                     31: long    kerb_debug;
                     32: 
                     33: krb_print_principal(a_n)
                     34:     Principal *a_n;
                     35: {
                     36:     /* run-time database does not contain string versions */
                     37:     time_p = localtime(&(a_n->exp_date));
                     38: 
                     39:     fprintf(stderr,
                     40:     "\n%s %s expires %4d-%2d-%2d %2d:%2d, max_life %d*5 = %d min  attr 0x%02x",
                     41:     a_n->name, a_n->instance,
                     42:     time_p->tm_year > 1900 ? time_p->tm_year : time_p->tm_year + 1900,
                     43:     time_p->tm_mon + 1, time_p->tm_mday,
                     44:     time_p->tm_hour, time_p->tm_min,
                     45:     a_n->max_life, 5 * a_n->max_life, a_n->attributes);
                     46: 
                     47:     fprintf(stderr,
                     48:     "\n\tkey_ver %d  k_low 0x%08x  k_high 0x%08x  akv %d  exists %d\n",
                     49:     a_n->key_version, a_n->key_low, a_n->key_high,
                     50:     a_n->kdc_key_ver, a_n->old);
                     51: 
                     52:     fflush(stderr);
                     53: }

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.