xref: /illumos-gate/usr/src/lib/gss_mechs/mech_krb5/et/kdb5_err.c (revision 1da57d551424de5a9d469760be7c4b4d4f10a755)
1 /*
2  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
3  * Use is subject to license terms.
4  */
5 
6 #include <locale.h>
7 const char *
kdb5_error_table(long errorno)8 kdb5_error_table(long errorno) {
9 
10 switch (errorno) {
11 	case 0:
12 		return(
13 			"$Id: kdb5_err.et,v 5.18 1995/11/03 21:52:42 eichin Exp $");
14 	case 1:
15 		return(dgettext(TEXT_DOMAIN,
16 			"Entry already exists in database"));
17 	case 2:
18 		return(dgettext(TEXT_DOMAIN,
19 			"Database store error"));
20 	case 3:
21 		return(dgettext(TEXT_DOMAIN,
22 			"Database read error"));
23 	case 4:
24 		return(dgettext(TEXT_DOMAIN,
25 			"Insufficient access to perform requested operation"));
26 	case 5:
27 		return(dgettext(TEXT_DOMAIN,
28 			"No such entry in the database"));
29 	case 6:
30 		return(dgettext(TEXT_DOMAIN,
31 			"Illegal use of wildcard"));
32 	case 7:
33 		return(dgettext(TEXT_DOMAIN,
34 			"Database is locked or in use--try again later"));
35 	case 8:
36 		return(dgettext(TEXT_DOMAIN,
37 			"Database was modified during read"));
38 	case 9:
39 		return(dgettext(TEXT_DOMAIN,
40 			"Database record is incomplete or corrupted"));
41 	case 10:
42 		return(dgettext(TEXT_DOMAIN,
43 			"Attempt to lock database twice"));
44 	case 11:
45 		return(dgettext(TEXT_DOMAIN,
46 			"Attempt to unlock database when not locked"));
47 	case 12:
48 		return(dgettext(TEXT_DOMAIN,
49 			"Invalid kdb lock mode"));
50 	case 13:
51 		return(dgettext(TEXT_DOMAIN,
52 			"Database has not been initialized"));
53 	case 14:
54 		return(dgettext(TEXT_DOMAIN,
55 			"Database has already been initialized"));
56 	case 15:
57 		return(dgettext(TEXT_DOMAIN,
58 			"Bad direction for converting keys"));
59 	case 16:
60 		return(dgettext(TEXT_DOMAIN,
61 			"Cannot find master key record in database"));
62 	case 17:
63 		return(dgettext(TEXT_DOMAIN,
64 			"Master key does not match database"));
65 	case 18:
66 		return(dgettext(TEXT_DOMAIN,
67 			"Key size in database is invalid"));
68 	case 19:
69 		return(dgettext(TEXT_DOMAIN,
70 			"Cannot find/read stored master key"));
71 	case 20:
72 		return(dgettext(TEXT_DOMAIN,
73 			"Stored master key is corrupted"));
74 	case 21:
75 		return(dgettext(TEXT_DOMAIN,
76 			"Insufficient access to lock database"));
77 	case 22:
78 		return(dgettext(TEXT_DOMAIN,
79 			"Database format error"));
80 	case 23:
81 		return(dgettext(TEXT_DOMAIN,
82 			"Unsupported version in database entry"));
83 	case 24:
84 		return(dgettext(TEXT_DOMAIN,
85 			"Unsupported salt type"));
86 	case 25:
87 		return(dgettext(TEXT_DOMAIN,
88 			"Unsupported encryption type"));
89 	case 26:
90 		return(dgettext(TEXT_DOMAIN,
91 			"Bad database creation flags"));
92 	case 27: /* KRB5_KDB_NO_PERMITTED_KEY */
93 		return(dgettext(TEXT_DOMAIN,
94 			"No matching key in entry having a permitted enctype"));
95 	case 28: /* KRB5_KDB_NO_MATCHING_KEY */
96 		return(dgettext(TEXT_DOMAIN,
97 			"No matching key in entry"));
98 	case 29: /* KRB5_LOG_CONV */
99 		return(dgettext(TEXT_DOMAIN, "Update log conversion error"));
100 	case 30: /* KRB5_LOG_UNSTABLE */
101 		return(dgettext(TEXT_DOMAIN, "Update log is unstable"));
102 	case 31: /* KRB5_LOG_CORRUPT */
103 		return(dgettext(TEXT_DOMAIN, "Update log is corrupt"));
104 	case 32: /* KRB5_LOG_ERROR */
105 		return(dgettext(TEXT_DOMAIN, "Generic update log error"));
106 	case 33: /* KRB5_KDB_DBTYPE_NOTFOUND */
107 		return(dgettext(TEXT_DOMAIN,
108 		    "Unable to find requested database type"));
109 	case 34: /* KRB5_KDB_DBTYPE_NOSUP */
110 		return(dgettext(TEXT_DOMAIN, "Database type not supported"));
111 	case 35: /* KRB5_KDB_DBTYPE_INIT */
112 		return(dgettext(TEXT_DOMAIN,
113 		    "Database library failed to initialize"));
114 	case 36: /* KRB5_KDB_SERVER_INTERNAL_ERR */
115 		return(dgettext(TEXT_DOMAIN, "Server error"));
116 	case 37: /* KRB5_KDB_ACCESS_ERROR */
117 		return(dgettext(TEXT_DOMAIN,
118 		    "Unable to access Kerberos database"));
119 	case 38: /* KRB5_KDB_INTERNAL_ERROR */
120 		return(dgettext(TEXT_DOMAIN,
121 		    "Kerberos database internal error"));
122 	case 39: /* KRB5_KDB_CONSTRAINT_VIOLATION */
123 		return(dgettext(TEXT_DOMAIN,
124 		    "Kerberos database constraints violated"));
125 	default:
126 		return("unknown error");
127 	}
128 }
129