xref: /titanic_41/usr/src/lib/gss_mechs/mech_krb5/et/gssapi_err_krb5.c (revision 7c478bd95313f5f23a4c958a745db2134aa03244)
1 /*
2  * Copyright 1998-2002 Sun Microsystems, Inc.  All rights reserved.
3  * Use is subject to license terms.
4  */
5 
6 #pragma ident	"%Z%%M%	%I%	%E% SMI"
7 
8 #include <locale.h>
9 const char *
k5g_error_table(long errorno)10 k5g_error_table(long errorno) {
11 
12 switch (errorno) {
13 	case 0:
14 		return(dgettext(TEXT_DOMAIN,
15 			"Principal in credential cache does not match desired name"));
16 	case 1:
17 		return(dgettext(TEXT_DOMAIN,
18 			"No principal in keytab matches desired name"));
19 	case 2:
20 		return(dgettext(TEXT_DOMAIN,
21 			"Credential cache has no TGT"));
22 	case 3:
23 		return(dgettext(TEXT_DOMAIN,
24 			"Authenticator has no subkey"));
25 	case 4:
26 		return(dgettext(TEXT_DOMAIN,
27 			"Context is already fully established"));
28 	case 5:
29 		return(dgettext(TEXT_DOMAIN,
30 			"Unknown signature type in token"));
31 	case 6:
32 		return(dgettext(TEXT_DOMAIN,
33 			"Invalid field length in token"));
34 	case 7:
35 		return(dgettext(TEXT_DOMAIN,
36 			"Attempt to use incomplete security context"));
37 	case 8:
38 		return(dgettext(TEXT_DOMAIN,
39 			"Bad magic number for krb5_gss_ctx_id_t"));
40 	case 9:
41 		return(dgettext(TEXT_DOMAIN,
42 			"Bad magic number for krb5_gss_cred_id_t"));
43 	case 10:
44 		return(dgettext(TEXT_DOMAIN,
45 			"Bad magic number for krb5_gss_enc_desc"));
46 	case 11:
47 		return(dgettext(TEXT_DOMAIN,
48 			"Sequence number in token is corrupt"));
49 	case 12:
50 		return(dgettext(TEXT_DOMAIN,
51 			"Credential cache is empty"));
52 	case 13:
53 		return(dgettext(TEXT_DOMAIN,
54 			"Acceptor and Initiator share no checksum types"));
55 	default:
56 		return("unknown error");
57 	}
58 }
59