1 /*
2  * Copyright 1997-2002 Sun Microsystems, Inc.  All rights reserved.
3  * Use is subject to license terms.
4  */
5 
6 #ifndef _KRB5_KDB_KDB_COMPAT_H
7 #define	_KRB5_KDB_KDB_COMPAT_H
8 
9 #ifdef	__cplusplus
10 extern "C" {
11 #endif
12 
13 
14 /*
15  * lib/kdb/kdb_compat.h
16  *
17  * Copyright 1994 by the Massachusetts Institute of Technology.
18  * All Rights Reserved.
19  *
20  * Export of this software from the United States of America may
21  *   require a specific license from the United States Government.
22  *   It is the responsibility of any person or organization contemplating
23  *   export to obtain such a license before exporting.
24  *
25  * WITHIN THAT CONSTRAINT, permission to use, copy, modify, and
26  * distribute this software and its documentation for any purpose and
27  * without fee is hereby granted, provided that the above copyright
28  * notice appear in all copies and that both that copyright notice and
29  * this permission notice appear in supporting documentation, and that
30  * the name of M.I.T. not be used in advertising or publicity pertaining
31  * to distribution of the software without specific, written prior
32  * permission.  Furthermore if you modify this software you must label
33  * your software as modified software and not distribute it in such a
34  * fashion that it might be confused with the original M.I.T. software.
35  * M.I.T. makes no representations about the suitability of
36  * this software for any purpose.  It is provided "as is" without express
37  * or implied warranty.
38  *
39  *
40  * KDC Database interface definitions.
41  */
42 
43 
44 typedef struct _old_krb5_encrypted_keyblock {
45     krb5_enctype enctype;
46     int length;
47     krb5_octet *contents;
48 } old_krb5_encrypted_keyblock;
49 
50 typedef struct old_krb5_principal_data {
51     krb5_magic magic;
52     krb5_data realm;
53     krb5_data *data;		/* An array of strings */
54     krb5_int32 length;
55     krb5_int32 type;
56 } old_krb5_principal_data;
57 
58 typedef	old_krb5_principal_data *old_krb5_principal;
59 
60 
61 /*
62  * Note --- this structure cannot be modified without changing the
63  * database version number in libkdb.a
64  */
65 typedef struct _old_krb5_db_entry {
66     old_krb5_principal principal;
67     old_krb5_encrypted_keyblock key;
68     krb5_kvno kvno;
69     krb5_deltat	max_life;
70     krb5_deltat	max_renewable_life;
71     krb5_kvno mkvno;			/* master encryption key vno */
72 
73     krb5_timestamp expiration;		/* This is when the client expires */
74     krb5_timestamp pw_expiration; 	/* This is when its password does */
75     krb5_timestamp last_pwd_change; 	/* Last time of password change  */
76     krb5_timestamp last_success;	/* Last successful password */
77 
78     krb5_timestamp last_failed;		/* Last failed password attempt */
79     krb5_kvno fail_auth_count; 		/* # of failed password attempts */
80 
81     old_krb5_principal mod_name;
82     krb5_timestamp mod_date;
83     krb5_flags attributes;
84     krb5_int32 salt_type:8,
85  	       salt_length:24;
86     krb5_octet *salt;
87     old_krb5_encrypted_keyblock alt_key;
88     krb5_int32 alt_salt_type:8,
89  	       alt_salt_length:24;
90     krb5_octet *alt_salt;
91 
92     krb5_int32 expansion[8];
93 } old_krb5_db_entry;
94 
95 
96 #ifdef	__cplusplus
97 }
98 #endif
99 
100 #endif	/* !_KRB5_KDB_KDB_COMPAT_H */
101