17c478bd9Sstevel@tonic-gate /*
27c478bd9Sstevel@tonic-gate  * Copyright 1997-2002 Sun Microsystems, Inc.  All rights reserved.
37c478bd9Sstevel@tonic-gate  * Use is subject to license terms.
47c478bd9Sstevel@tonic-gate  */
57c478bd9Sstevel@tonic-gate 
67c478bd9Sstevel@tonic-gate #ifndef _KRB5_KDB_KDB_COMPAT_H
77c478bd9Sstevel@tonic-gate #define	_KRB5_KDB_KDB_COMPAT_H
87c478bd9Sstevel@tonic-gate 
97c478bd9Sstevel@tonic-gate #ifdef	__cplusplus
107c478bd9Sstevel@tonic-gate extern "C" {
117c478bd9Sstevel@tonic-gate #endif
127c478bd9Sstevel@tonic-gate 
137c478bd9Sstevel@tonic-gate 
147c478bd9Sstevel@tonic-gate /*
157c478bd9Sstevel@tonic-gate  * lib/kdb/kdb_compat.h
167c478bd9Sstevel@tonic-gate  *
177c478bd9Sstevel@tonic-gate  * Copyright 1994 by the Massachusetts Institute of Technology.
187c478bd9Sstevel@tonic-gate  * All Rights Reserved.
197c478bd9Sstevel@tonic-gate  *
207c478bd9Sstevel@tonic-gate  * Export of this software from the United States of America may
217c478bd9Sstevel@tonic-gate  *   require a specific license from the United States Government.
227c478bd9Sstevel@tonic-gate  *   It is the responsibility of any person or organization contemplating
237c478bd9Sstevel@tonic-gate  *   export to obtain such a license before exporting.
24*1da57d55SToomas Soome  *
257c478bd9Sstevel@tonic-gate  * WITHIN THAT CONSTRAINT, permission to use, copy, modify, and
267c478bd9Sstevel@tonic-gate  * distribute this software and its documentation for any purpose and
277c478bd9Sstevel@tonic-gate  * without fee is hereby granted, provided that the above copyright
287c478bd9Sstevel@tonic-gate  * notice appear in all copies and that both that copyright notice and
297c478bd9Sstevel@tonic-gate  * this permission notice appear in supporting documentation, and that
307c478bd9Sstevel@tonic-gate  * the name of M.I.T. not be used in advertising or publicity pertaining
317c478bd9Sstevel@tonic-gate  * to distribution of the software without specific, written prior
327c478bd9Sstevel@tonic-gate  * permission.  Furthermore if you modify this software you must label
337c478bd9Sstevel@tonic-gate  * your software as modified software and not distribute it in such a
347c478bd9Sstevel@tonic-gate  * fashion that it might be confused with the original M.I.T. software.
357c478bd9Sstevel@tonic-gate  * M.I.T. makes no representations about the suitability of
367c478bd9Sstevel@tonic-gate  * this software for any purpose.  It is provided "as is" without express
377c478bd9Sstevel@tonic-gate  * or implied warranty.
38*1da57d55SToomas Soome  *
397c478bd9Sstevel@tonic-gate  *
407c478bd9Sstevel@tonic-gate  * KDC Database interface definitions.
417c478bd9Sstevel@tonic-gate  */
427c478bd9Sstevel@tonic-gate 
437c478bd9Sstevel@tonic-gate 
447c478bd9Sstevel@tonic-gate typedef struct _old_krb5_encrypted_keyblock {
457c478bd9Sstevel@tonic-gate     krb5_enctype enctype;
467c478bd9Sstevel@tonic-gate     int length;
477c478bd9Sstevel@tonic-gate     krb5_octet *contents;
487c478bd9Sstevel@tonic-gate } old_krb5_encrypted_keyblock;
497c478bd9Sstevel@tonic-gate 
507c478bd9Sstevel@tonic-gate typedef struct old_krb5_principal_data {
517c478bd9Sstevel@tonic-gate     krb5_magic magic;
527c478bd9Sstevel@tonic-gate     krb5_data realm;
537c478bd9Sstevel@tonic-gate     krb5_data *data;		/* An array of strings */
547c478bd9Sstevel@tonic-gate     krb5_int32 length;
557c478bd9Sstevel@tonic-gate     krb5_int32 type;
567c478bd9Sstevel@tonic-gate } old_krb5_principal_data;
577c478bd9Sstevel@tonic-gate 
587c478bd9Sstevel@tonic-gate typedef	old_krb5_principal_data *old_krb5_principal;
597c478bd9Sstevel@tonic-gate 
607c478bd9Sstevel@tonic-gate 
617c478bd9Sstevel@tonic-gate /*
627c478bd9Sstevel@tonic-gate  * Note --- this structure cannot be modified without changing the
637c478bd9Sstevel@tonic-gate  * database version number in libkdb.a
647c478bd9Sstevel@tonic-gate  */
657c478bd9Sstevel@tonic-gate typedef struct _old_krb5_db_entry {
667c478bd9Sstevel@tonic-gate     old_krb5_principal principal;
677c478bd9Sstevel@tonic-gate     old_krb5_encrypted_keyblock key;
687c478bd9Sstevel@tonic-gate     krb5_kvno kvno;
697c478bd9Sstevel@tonic-gate     krb5_deltat	max_life;
707c478bd9Sstevel@tonic-gate     krb5_deltat	max_renewable_life;
717c478bd9Sstevel@tonic-gate     krb5_kvno mkvno;			/* master encryption key vno */
72*1da57d55SToomas Soome 
737c478bd9Sstevel@tonic-gate     krb5_timestamp expiration;		/* This is when the client expires */
747c478bd9Sstevel@tonic-gate     krb5_timestamp pw_expiration; 	/* This is when its password does */
757c478bd9Sstevel@tonic-gate     krb5_timestamp last_pwd_change; 	/* Last time of password change  */
767c478bd9Sstevel@tonic-gate     krb5_timestamp last_success;	/* Last successful password */
77*1da57d55SToomas Soome 
787c478bd9Sstevel@tonic-gate     krb5_timestamp last_failed;		/* Last failed password attempt */
797c478bd9Sstevel@tonic-gate     krb5_kvno fail_auth_count; 		/* # of failed password attempts */
80*1da57d55SToomas Soome 
817c478bd9Sstevel@tonic-gate     old_krb5_principal mod_name;
827c478bd9Sstevel@tonic-gate     krb5_timestamp mod_date;
837c478bd9Sstevel@tonic-gate     krb5_flags attributes;
847c478bd9Sstevel@tonic-gate     krb5_int32 salt_type:8,
857c478bd9Sstevel@tonic-gate  	       salt_length:24;
867c478bd9Sstevel@tonic-gate     krb5_octet *salt;
877c478bd9Sstevel@tonic-gate     old_krb5_encrypted_keyblock alt_key;
887c478bd9Sstevel@tonic-gate     krb5_int32 alt_salt_type:8,
897c478bd9Sstevel@tonic-gate  	       alt_salt_length:24;
907c478bd9Sstevel@tonic-gate     krb5_octet *alt_salt;
91*1da57d55SToomas Soome 
927c478bd9Sstevel@tonic-gate     krb5_int32 expansion[8];
937c478bd9Sstevel@tonic-gate } old_krb5_db_entry;
947c478bd9Sstevel@tonic-gate 
957c478bd9Sstevel@tonic-gate 
967c478bd9Sstevel@tonic-gate #ifdef	__cplusplus
977c478bd9Sstevel@tonic-gate }
987c478bd9Sstevel@tonic-gate #endif
997c478bd9Sstevel@tonic-gate 
1007c478bd9Sstevel@tonic-gate #endif	/* !_KRB5_KDB_KDB_COMPAT_H */
101