xref: /titanic_50/usr/src/cmd/krb5/kadmin/dbutil/kdb5_util.h (revision 711890bc9379ceea66272dc8d4981812224ea86e)
1 /*
2  * Copyright 2006 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.  Furthermore if you modify this software you must label
51  * your software as modified software and not distribute it in such a
52  * fashion that it might be confused with the original M.I.T. software.
53  * M.I.T. makes no representations about the suitability of
54  * this software for any purpose.  It is provided "as is" without express
55  * or implied warranty.
56  *
57  */
58 #include <kdb/kdb_log.h>
59 #define MAX_HEADER      1024
60 #define REALM_SEP	'@'
61 #define REALM_SEP_STR	"@"
62 
63 extern char *progname;
64 extern char *Err_no_database;
65 extern krb5_boolean dbactive;
66 extern int exit_status;
67 extern krb5_context util_context;
68 extern kadm5_config_params global_params;
69 extern int valid_master_key;
70 extern krb5_db_entry master_db;
71 
72 extern void usage(void);
73 
74 extern void add_key
75 	(char const *, char const *,
76 		   krb5_const_principal, const krb5_keyblock *,
77 		   krb5_kvno, krb5_keysalt *);
78 extern int set_dbname_help
79 	(char *, char *);
80 
81 extern char *kdb5_util_Init (int, char **);
82 
83 extern int quit (void);
84 
85 extern int check_for_match
86 	(char *, int, krb5_db_entry *, int, int);
87 
88 extern void parse_token
89 	(char *, int *, int *, char *);
90 
91 extern int create_db_entry (krb5_principal, krb5_db_entry *);
92 
93 extern int kadm5_create_magic_princs (kadm5_config_params *params,
94 						krb5_context context);
95 
96 extern int process_ov_principal (char *fname, krb5_context kcontext,
97 					   FILE *filep, int verbose,
98 					   int *linenop,
99 					   void *pol_db);
100 
101 extern void load_db (int argc, char **argv);
102 extern void dump_db (int argc, char **argv);
103 extern void kdb5_create (int argc, char **argv);
104 extern void kdb5_destroy (int argc, char **argv);
105 extern void kdb5_stash (int argc, char **argv);
106 
107 extern void update_ok_file (char *file_name);
108 
109 extern int kadm5_create (kadm5_config_params *params);
110 
111 void usage (void);
112 
113 #ifdef	__cplusplus
114 }
115 #endif
116 
117 #endif	/* !_KDB5_UTIL_H */
118