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