1 #pragma ident "%Z%%M% %I% %E% SMI" 2 /* 3 * include/krb5/adm_proto.h 4 * 5 * Copyright 1995 by the Massachusetts Institute of Technology. 6 * All Rights Reserved. 7 * 8 * Export of this software from the United States of America may 9 * require a specific license from the United States Government. 10 * It is the responsibility of any person or organization contemplating 11 * export to obtain such a license before exporting. 12 * 13 * WITHIN THAT CONSTRAINT, permission to use, copy, modify, and 14 * distribute this software and its documentation for any purpose and 15 * without fee is hereby granted, provided that the above copyright 16 * notice appear in all copies and that both that copyright notice and 17 * this permission notice appear in supporting documentation, and that 18 * the name of M.I.T. not be used in advertising or publicity pertaining 19 * to distribution of the software without specific, written prior 20 * permission. Furthermore if you modify this software you must label 21 * your software as modified software and not distribute it in such a 22 * fashion that it might be confused with the original M.I.T. software. 23 * M.I.T. makes no representations about the suitability of 24 * this software for any purpose. It is provided "as is" without express 25 * or implied warranty. 26 * 27 */ 28 #ifndef KRB5_ADM_PROTO_H__ 29 #define KRB5_ADM_PROTO_H__ 30 31 /* 32 * This is ugly, but avoids having to include k5-int or kdb.h for this. 33 */ 34 #ifndef KRB5_KDB5__ 35 struct _krb5_db_entry; 36 typedef struct _krb5_db_entry krb5_db_entry; 37 #endif /* KRB5_KDB5__ */ 38 39 /* Ditto for adm.h or kadm5/admin.h */ 40 41 /* 42 * XXXX krb5_realm params is defined in two header files!!!! 43 * This really needs to be fixed!!! 44 */ 45 #if !defined(KRB5_ADM_H__) && !defined(__KADM5_ADMIN_H__) 46 #ifndef __KADM5_ADMIN_H__ 47 struct ___krb5_realm_params; 48 typedef struct ___krb5_realm_params krb5_realm_params; 49 50 struct ___krb5_key_salt_tuple; 51 typedef struct ___krb5_key_salt_tuple krb5_key_salt_tuple; 52 #endif /* __KADM5_ADMIN_H__ */ 53 #endif /* KRB5_ADM_H__ */ 54 55 /* 56 * Function prototypes. 57 */ 58 59 /* adm_conn.c */ 60 krb5_error_code KRB5_CALLCONV krb5_adm_connect 61 (krb5_context, 62 char *, 63 char *, 64 char *, 65 int *, 66 krb5_auth_context *, 67 krb5_ccache *, 68 char *, 69 krb5_timestamp); 70 void KRB5_CALLCONV krb5_adm_disconnect 71 (krb5_context, 72 int *, 73 krb5_auth_context, 74 krb5_ccache); 75 76 #if !defined(_MSDOS) && !defined(_WIN32) && !defined(macintosh) 77 /* adm_kw_dec.c */ 78 krb5_error_code krb5_adm_proto_to_dbent 79 (krb5_context, 80 krb5_int32, 81 krb5_data *, 82 krb5_ui_4 *, 83 krb5_db_entry *, 84 char **); 85 86 /* adm_kw_enc.c */ 87 krb5_error_code krb5_adm_dbent_to_proto 88 (krb5_context, 89 krb5_ui_4, 90 krb5_db_entry *, 91 char *, 92 krb5_int32 *, 93 krb5_data **); 94 #endif /* !(windows or macintosh) */ 95 96 /* adm_kt_dec.c */ 97 krb5_error_code krb5_adm_proto_to_ktent 98 (krb5_context, 99 krb5_int32, 100 krb5_data *, 101 krb5_keytab_entry *); 102 103 /* adm_kt_enc.c */ 104 krb5_error_code krb5_adm_ktent_to_proto 105 (krb5_context, 106 krb5_keytab_entry *, 107 krb5_int32 *, 108 krb5_data **); 109 110 /* adm_rw.c */ 111 void KRB5_CALLCONV krb5_free_adm_data 112 (krb5_context, 113 krb5_int32, 114 krb5_data *); 115 116 krb5_error_code KRB5_CALLCONV krb5_send_adm_cmd 117 (krb5_context, 118 krb5_pointer, 119 krb5_auth_context, 120 krb5_int32, 121 krb5_data *); 122 krb5_error_code krb5_send_adm_reply 123 (krb5_context, 124 krb5_pointer, 125 krb5_auth_context, 126 krb5_int32, 127 krb5_int32, 128 krb5_data *); 129 krb5_error_code krb5_read_adm_cmd 130 (krb5_context, 131 krb5_pointer, 132 krb5_auth_context, 133 krb5_int32 *, 134 krb5_data **); 135 krb5_error_code KRB5_CALLCONV krb5_read_adm_reply 136 (krb5_context, 137 krb5_pointer, 138 krb5_auth_context, 139 krb5_int32 *, 140 krb5_int32 *, 141 krb5_data **); 142 143 /* logger.c */ 144 krb5_error_code krb5_klog_init 145 (krb5_context, 146 char *, 147 char *, 148 krb5_boolean); 149 void krb5_klog_close (krb5_context); 150 int krb5_klog_syslog (int, const char *, ...); 151 void krb5_klog_reopen (krb5_context); 152 153 /* alt_prof.c */ 154 krb5_error_code krb5_aprof_init 155 (char *, char *, krb5_pointer *); 156 krb5_error_code krb5_aprof_getvals 157 (krb5_pointer, const char **, char ***); 158 krb5_error_code krb5_aprof_get_deltat 159 (krb5_pointer, 160 const char **, 161 krb5_boolean, 162 krb5_deltat *); 163 krb5_error_code krb5_aprof_get_string 164 (krb5_pointer, const char **, krb5_boolean, char **); 165 krb5_error_code krb5_aprof_get_int32 166 (krb5_pointer, 167 const char **, 168 krb5_boolean, 169 krb5_int32 *); 170 krb5_error_code krb5_aprof_finish (krb5_pointer); 171 172 krb5_error_code krb5_read_realm_params (krb5_context, 173 char *, 174 char *, 175 char *, 176 krb5_realm_params **); 177 krb5_error_code krb5_free_realm_params (krb5_context, 178 krb5_realm_params *); 179 180 /* str_conv.c */ 181 krb5_error_code 182 krb5_string_to_flags (char *, 183 const char *, 184 const char *, 185 krb5_flags *); 186 krb5_error_code 187 krb5_flags_to_string (krb5_flags, 188 const char *, 189 char *, 190 size_t); 191 krb5_error_code 192 krb5_input_flag_to_string (int, 193 char *, 194 size_t); 195 196 /* keysalt.c */ 197 krb5_boolean 198 krb5_keysalt_is_present (krb5_key_salt_tuple *, 199 krb5_int32, 200 krb5_enctype, 201 krb5_int32); 202 krb5_error_code 203 krb5_keysalt_iterate 204 (krb5_key_salt_tuple *, 205 krb5_int32, 206 krb5_boolean, 207 krb5_error_code (*) 208 (krb5_key_salt_tuple *, 209 krb5_pointer), 210 krb5_pointer); 211 212 krb5_error_code 213 krb5_string_to_keysalts (char *, 214 const char *, 215 const char *, 216 krb5_boolean, 217 krb5_key_salt_tuple **, 218 krb5_int32 *); 219 #endif /* KRB5_ADM_PROTO_H__ */ 220