1 /* -*- mode: c; c-basic-offset: 4; indent-tabs-mode: nil -*- */ 2 /* include/adm_proto.h */ 3 /* 4 * Copyright 1995, 2007,2008,2009 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 admin.h */ 39 40 #ifndef KRB5_KDB5__ 41 struct ___krb5_key_salt_tuple; 42 typedef struct ___krb5_key_salt_tuple krb5_key_salt_tuple; 43 #endif /* KRB5_KDB5__ */ 44 45 /* 46 * Function prototypes. 47 */ 48 49 /* logger.c */ 50 krb5_error_code krb5_klog_init(krb5_context, char *, char *, krb5_boolean); 51 void krb5_klog_set_context(krb5_context); 52 void krb5_klog_close(krb5_context); 53 int krb5_klog_syslog(int, const char *, ...) 54 #if !defined(__cplusplus) && (__GNUC__ > 2) 55 __attribute__((__format__(__printf__, 2, 3))) 56 #endif 57 ; 58 void krb5_klog_reopen (krb5_context); 59 60 /* alt_prof.c */ 61 krb5_error_code krb5_aprof_getvals(krb5_pointer, const char **, char ***); 62 krb5_error_code krb5_aprof_get_boolean(krb5_pointer, const char **, int, 63 krb5_boolean *); 64 krb5_error_code krb5_aprof_get_deltat(krb5_pointer, const char **, 65 krb5_boolean, krb5_deltat *); 66 krb5_error_code krb5_aprof_get_string(krb5_pointer, const char **, 67 krb5_boolean, char **); 68 krb5_error_code krb5_aprof_get_string_all(krb5_pointer, const char **, 69 char **); 70 krb5_error_code krb5_aprof_get_int32(krb5_pointer, const char **, 71 krb5_boolean, krb5_int32 *); 72 73 /* str_conv.c */ 74 krb5_error_code krb5_flagspec_to_mask(const char *, 75 krb5_flags *, krb5_flags *); 76 krb5_error_code krb5_flagnum_to_string(int, char **); 77 krb5_error_code krb5_flags_to_strings(krb5_int32, char ***); 78 79 /* keysalt.c */ 80 krb5_boolean krb5_keysalt_is_present(krb5_key_salt_tuple *, krb5_int32, 81 krb5_enctype, krb5_int32); 82 krb5_error_code krb5_keysalt_iterate(krb5_key_salt_tuple *, krb5_int32, 83 krb5_boolean, 84 krb5_error_code (*)(krb5_key_salt_tuple *, 85 krb5_pointer), 86 krb5_pointer); 87 88 krb5_error_code krb5_string_to_keysalts(const char *, const char *, 89 const char *, krb5_boolean, 90 krb5_key_salt_tuple **, krb5_int32 *); 91 #endif /* KRB5_ADM_PROTO_H__ */ 92