1 /*
2  * include/krb5/adm_proto.h
3  *
4  * Copyright 1995 by the Massachusetts Institute of Technology.
5  * All Rights Reserved.
6  *
7  * Export of this software from the United States of America may
8  *   require a specific license from the United States Government.
9  *   It is the responsibility of any person or organization contemplating
10  *   export to obtain such a license before exporting.
11  *
12  * WITHIN THAT CONSTRAINT, permission to use, copy, modify, and
13  * distribute this software and its documentation for any purpose and
14  * without fee is hereby granted, provided that the above copyright
15  * notice appear in all copies and that both that copyright notice and
16  * this permission notice appear in supporting documentation, and that
17  * the name of M.I.T. not be used in advertising or publicity pertaining
18  * to distribution of the software without specific, written prior
19  * permission.  Furthermore if you modify this software you must label
20  * your software as modified software and not distribute it in such a
21  * fashion that it might be confused with the original M.I.T. software.
22  * M.I.T. makes no representations about the suitability of
23  * this software for any purpose.  It is provided "as is" without express
24  * or implied warranty.
25  *
26  */
27 #ifndef	KRB5_ADM_PROTO_H__
28 #define	KRB5_ADM_PROTO_H__
29 
30 /*
31  * This is ugly, but avoids having to include k5-int or kdb.h for this.
32  */
33 #ifndef	KRB5_KDB5__
34 struct _krb5_db_entry;
35 typedef struct _krb5_db_entry krb5_db_entry;
36 #endif	/* KRB5_KDB5__ */
37 
38 /* Ditto for adm.h */
39 
40 /*
41  * XXXX krb5_realm params is defined in two header files!!!!
42  * This really needs to be fixed!!!
43  */
44 #if !defined(KRB5_ADM_H__) && !defined(__KADM5_ADMIN_H__)
45 struct ___krb5_realm_params;
46 typedef struct ___krb5_realm_params krb5_realm_params;
47 #endif	/* KRB5_ADM_H__ */
48 
49 #ifndef KRB5_KDB5__
50 struct ___krb5_key_salt_tuple;
51 typedef struct ___krb5_key_salt_tuple krb5_key_salt_tuple;
52 #endif	/* KRB5_KDB5__ */
53 
54 /*
55  * Function prototypes.
56  */
57 
58 /* logger.c */
59 krb5_error_code krb5_klog_init
60 	(krb5_context,
61 	 char *,
62 	 char *,
63 	 krb5_boolean);
64 void krb5_klog_close (krb5_context);
65 int krb5_klog_syslog (int, const char *, ...);
66 void krb5_klog_reopen (krb5_context);
67 
68 /* alt_prof.c */
69 krb5_error_code krb5_aprof_init
70 	(char *, char *, krb5_pointer *);
71 krb5_error_code krb5_aprof_getvals
72 	(krb5_pointer, const char **, char ***);
73 krb5_error_code krb5_aprof_get_boolean
74         (krb5_pointer, const char **, int, krb5_boolean *);
75 krb5_error_code krb5_aprof_get_deltat
76 	(krb5_pointer,
77 	 const char **,
78 	 krb5_boolean,
79 	 krb5_deltat *);
80 krb5_error_code krb5_aprof_get_string
81 	(krb5_pointer, const char **, krb5_boolean, char **);
82 krb5_error_code krb5_aprof_get_int32
83 	(krb5_pointer,
84 	 const char **,
85 	 krb5_boolean,
86 	 krb5_int32 *);
87 krb5_error_code krb5_aprof_finish (krb5_pointer);
88 
89 krb5_error_code krb5_read_realm_params (krb5_context,
90 					char *,
91 					krb5_realm_params **);
92 krb5_error_code krb5_free_realm_params (krb5_context,
93 					krb5_realm_params *);
94 
95 /* str_conv.c */
96 krb5_error_code
97 krb5_string_to_flags (char *,
98 		      const char *,
99 		      const char *,
100 		      krb5_flags *);
101 krb5_error_code
102 krb5_flags_to_string (krb5_flags,
103 		      const char *,
104 		      char *,
105 		      size_t);
106 krb5_error_code
107 krb5_input_flag_to_string (int,
108 			   char *,
109 			   size_t);
110 
111 /* keysalt.c */
112 krb5_boolean
113 krb5_keysalt_is_present (krb5_key_salt_tuple *,
114 			 krb5_int32,
115 			 krb5_enctype,
116 			 krb5_int32);
117 krb5_error_code
118 krb5_keysalt_iterate (krb5_key_salt_tuple *,
119 		      krb5_int32,
120 		      krb5_boolean,
121 		      krb5_error_code (*) (krb5_key_salt_tuple *,
122 					   krb5_pointer),
123 		      krb5_pointer);
124 
125 krb5_error_code
126 krb5_string_to_keysalts (char *,
127 			 const char *,
128 			 const char *,
129 			 krb5_boolean,
130 			 krb5_key_salt_tuple **,
131 			 krb5_int32 *);
132 #endif	/* KRB5_ADM_PROTO_H__ */
133