|
|
1.1 root 1: /*
2: * $Source: /usr/src/kerberosIV/include/RCS/krb_db.h,v $
3: * $Author: kfall $
4: * $Header: /usr/src/kerberosIV/include/RCS/krb_db.h,v 4.10 90/06/25 20:50:50 kfall Exp $
5: *
6: * Copyright 1987, 1988 by the Massachusetts Institute of Technology.
7: *
8: * For copying and distribution information, please see the file
9: * <mit-copyright.h>.
10: *
11: * spm Project Athena 8/85
12: *
13: * This file defines data structures for the kerberos
14: * authentication/authorization database.
15: *
16: * They MUST correspond to those defined in *.rel
17: */
18:
19: #ifdef ATHENA
20: #include <mit-copyright.h>
21: #endif
22:
23: #ifndef KRB_DB_DEFS
24: #define KRB_DB_DEFS
25:
26: #define KERB_M_NAME "K" /* Kerberos */
27: #define KERB_M_INST "M" /* Master */
28: #define KERB_DEFAULT_NAME "default"
29: #define KERB_DEFAULT_INST ""
30: #define DBM_FILE "/etc/kerberosIV/principal"
31:
32: /* this also defines the number of queue headers */
33: #define KERB_DB_HASH_MODULO 64
34:
35:
36: /* Arguments to kerb_dbl_lock() */
37:
38: #define KERB_DBL_EXCLUSIVE 1
39: #define KERB_DBL_SHARED 0
40:
41: /* arguments to kerb_db_set_lockmode() */
42:
43: #define KERB_DBL_BLOCKING 0
44: #define KERB_DBL_NONBLOCKING 1
45:
46: /* Principal defines the structure of a principal's name */
47:
48: typedef struct {
49: char name[ANAME_SZ];
50: char instance[INST_SZ];
51:
52: unsigned long key_low;
53: unsigned long key_high;
54: unsigned long exp_date;
55: char exp_date_txt[DATE_SZ];
56: unsigned long mod_date;
57: char mod_date_txt[DATE_SZ];
58: unsigned short attributes;
59: unsigned char max_life;
60: unsigned char kdc_key_ver;
61: unsigned char key_version;
62:
63: char mod_name[ANAME_SZ];
64: char mod_instance[INST_SZ];
65: char *old; /* cast to (Principal *); not in db,
66: * ptr to old vals */
67: }
68: Principal;
69:
70: typedef struct {
71: long cpu;
72: long elapsed;
73: long dio;
74: long pfault;
75: long t_stamp;
76: long n_retrieve;
77: long n_replace;
78: long n_append;
79: long n_get_stat;
80: long n_put_stat;
81: }
82: DB_stat;
83:
84: /* Dba defines the structure of a database administrator */
85:
86: typedef struct {
87: char name[ANAME_SZ];
88: char instance[INST_SZ];
89: unsigned short attributes;
90: unsigned long exp_date;
91: char exp_date_txt[DATE_SZ];
92: char *old; /*
93: * cast to (Dba *); not in db, ptr to
94: * old vals
95: */
96: }
97: Dba;
98:
99: extern int kerb_get_principal();
100: extern int kerb_put_principal();
101: extern int kerb_db_get_stat();
102: extern int kerb_db_put_stat();
103: extern int kerb_get_dba();
104: extern int kerb_db_get_dba();
105:
106: #endif /* KRB_DB_DEFS */
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.