4
* Copyright 1988, 2002 by the Massachusetts Institute of Technology.
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.
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.
31
* This is gross. We want krb_err_txt to match the contents of the
32
* com_err error table, but the text is static in krb_err.c. We can't
33
* alias it by making a pointer to it, either, so we have to suck in
34
* another copy of it that is named differently. */
35
#if TARGET_OS_MAC && !defined(DEPEND)
36
#undef initialize_krb_error_table
37
#define initialize_krb_error_table krb4int_init_krb_err_tbl
38
void krb4int_init_krb_err_tbl(void);
40
#undef initialize_krb_error_table
43
* Depends on the name of the static table generated by compile_et,
44
* but since this is only on Darwin, where we will always use a
45
* certain compile_et, it should be ok.
47
const char * const * const krb_err_txt = text;
50
/* Don't put this in auto-generated dependencies. */
51
#include "krb_err_txt.c"
55
void initialize_krb_error_table(void);
57
static int inited = 0;
64
add_error_table(&et_krb_error_table);
72
remove_error_table(&et_krb_error_table);
75
const char * KRB5_CALLCONV
76
krb_get_err_text(code)
81
* Shift krb error code into com_err number space.
83
if (code >= 0 && code < MAX_KRB_ERRORS)
84
return error_message(ERROR_TABLE_BASE_krb + code);
86
return "Invalid Kerberos error code";