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