xref: /titanic_52/usr/src/cmd/krb5/kadmin/dbutil/kdb5_util.h (revision ba4e3c84e6b9390bbf7df80b5f1d11dec34cc525)
1 /*
2  * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
3  * Use is subject to license terms.
4  */
5 
6 #ifndef _KDB5_UTIL_H
7 #define	_KDB5_UTIL_H
8 
9 #pragma ident	"%Z%%M%	%I%	%E% SMI"
10 
11 /*
12  * WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING
13  *
14  *	Openvision retains the copyright to derivative works of
15  *	this source code.  Do *NOT* create a derivative of this
16  *	source code before consulting with your legal department.
17  *	Do *NOT* integrate *ANY* of this source code into another
18  *	product before consulting with your legal department.
19  *
20  *	For further information, read the top-level Openvision
21  *	copyright which is contained in the top-level MIT Kerberos
22  *	copyright.
23  *
24  * WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING
25  *
26  */
27 
28 #ifdef	__cplusplus
29 extern "C" {
30 #endif
31 
32 /*
33  * admin/edit/kdb5_edit.h
34  *
35  * Copyright 1992 by the Massachusetts Institute of Technology.
36  * All Rights Reserved.
37  *
38  * Export of this software from the United States of America may
39  *   require a specific license from the United States Government.
40  *   It is the responsibility of any person or organization contemplating
41  *   export to obtain such a license before exporting.
42  *
43  * WITHIN THAT CONSTRAINT, permission to use, copy, modify, and
44  * distribute this software and its documentation for any purpose and
45  * without fee is hereby granted, provided that the above copyright
46  * notice appear in all copies and that both that copyright notice and
47  * this permission notice appear in supporting documentation, and that
48  * the name of M.I.T. not be used in advertising or publicity pertaining
49  * to distribution of the software without specific, written prior
50  * permission.  M.I.T. makes no representations about the suitability of
51  * this software for any purpose.  It is provided "as is" without express
52  * or implied warranty.
53  *
54  */
55 
56 #include <kdb/kdb_log.h>
57 
58 #define	MAX_HEADER	1024
59 #define	REALM_SEP	'@'
60 #define	REALM_SEP_STR	"@"
61 
62 extern char *progname;
63 extern char *Err_no_database;
64 
65 void add_key
66 (char const *, char const *,
67 	krb5_const_principal, const krb5_keyblock *,
68 	krb5_kvno, krb5_keysalt *);
69 int set_dbname_help
70     (char *, char *);
71 
72 char *kdb5_util_Init (int, char **);
73 
74 int quit();
75 
76 int check_for_match
77     (char *, int, krb5_db_entry *, int, int);
78 
79 void parse_token
80     (char *, int *, int *, char *);
81 
82 int create_db_entry
83     (krb5_principal, krb5_db_entry *);
84 
85 #ifdef	__cplusplus
86 }
87 #endif
88 
89 #endif	/* !_KDB5_UTIL_H */
90