xref: /titanic_52/usr/src/lib/gss_mechs/mech_krb5/et/kadm_err.c (revision 7c478bd95313f5f23a4c958a745db2134aa03244)
1 /*
2  * Copyright 2004 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 *
10 ovk_error_table(long errorno) {
11 
12 switch (errorno) {
13 	case 0:
14 		return(dgettext(TEXT_DOMAIN,
15 			"Operation failed for unspecified reason"));
16 	case 1:
17 		return(dgettext(TEXT_DOMAIN,
18 			"Operation requires ``get'' privilege"));
19 	case 2:
20 		return(dgettext(TEXT_DOMAIN,
21 			"Operation requires ``add'' privilege"));
22 	case 3:
23 		return(dgettext(TEXT_DOMAIN,
24 			"Operation requires ``modify'' privilege"));
25 	case 4:
26 		return(dgettext(TEXT_DOMAIN,
27 			"Operation requires ``delete'' privilege"));
28 	case 5:
29 		return(dgettext(TEXT_DOMAIN,
30 			"Insufficient authorization for operation"));
31 	case 6:
32 		return(dgettext(TEXT_DOMAIN,
33 			"Database inconsistency detected"));
34 	case 7:
35 		return(dgettext(TEXT_DOMAIN,
36 			"Principal or policy already exists"));
37 	case 8:
38 		return(dgettext(TEXT_DOMAIN,
39 			"Communication failure with server"));
40 	case 9:
41 		return(dgettext(TEXT_DOMAIN,
42 			"No administration server found for realm"));
43 	case 10:
44 		return(dgettext(TEXT_DOMAIN,
45 			"Password history principal key version mismatch"));
46 	case 11:
47 		return(dgettext(TEXT_DOMAIN,
48 			"Connection to server not initialized"));
49 	case 12:
50 		return(dgettext(TEXT_DOMAIN,
51 			"Principal does not exist"));
52 	case 13:
53 		return(dgettext(TEXT_DOMAIN,
54 			"Policy does not exist"));
55 	case 14:
56 		return(dgettext(TEXT_DOMAIN,
57 			"Invalid field mask for operation"));
58 	case 15:
59 		return(dgettext(TEXT_DOMAIN,
60 			"Invalid number of character classes"));
61 	case 16:
62 		return(dgettext(TEXT_DOMAIN,
63 			"Invalid password length"));
64 	case 17:
65 		return(dgettext(TEXT_DOMAIN,
66 			"Illegal policy name"));
67 	case 18:
68 		return(dgettext(TEXT_DOMAIN,
69 			"Illegal principal name"));
70 	case 19:
71 		return(dgettext(TEXT_DOMAIN,
72 			"Invalid auxillary attributes"));
73 	case 20:
74 		return(dgettext(TEXT_DOMAIN,
75 			"Invalid password history count"));
76 	case 21:
77 		return(dgettext(TEXT_DOMAIN,
78 			"Password minimum life is greater than password maximum life"));
79 	case 22:
80 		return(dgettext(TEXT_DOMAIN,
81 			"Password is too short"));
82 	case 23:
83 		return(dgettext(TEXT_DOMAIN,
84 			"Password does not contain enough character classes"));
85 	case 24:
86 		return(dgettext(TEXT_DOMAIN,
87 			"Password is in the password dictionary"));
88 	case 25:
89 		return(dgettext(TEXT_DOMAIN,
90 			"Cannot reuse password"));
91 	case 26:
92 		return(dgettext(TEXT_DOMAIN,
93 			"Current password's minimum life has not expired"));
94 	case 27:
95 		return(dgettext(TEXT_DOMAIN,
96 			"Policy is in use"));
97 	case 28:
98 		return(dgettext(TEXT_DOMAIN,
99 			"Connection to server already initialized"));
100 	case 29:
101 		return(dgettext(TEXT_DOMAIN,
102 			"Incorrect password"));
103 	case 30:
104 		return(dgettext(TEXT_DOMAIN,
105 			"Cannot change protected principal"));
106 	case 31:
107 		return(dgettext(TEXT_DOMAIN,
108 			"Programmer error! Bad Admin server handle"));
109 	case 32:
110 		return(dgettext(TEXT_DOMAIN,
111 			"Programmer error! Bad API structure version"));
112 	case 33:
113 		return(dgettext(TEXT_DOMAIN,
114 			"API structure version specified by application is no longer supported (to fix, recompile application against current KADM5 API header files and libraries)"));
115 	case 34:
116 		return(dgettext(TEXT_DOMAIN,
117 			"API structure version specified by application is unknown to libraries (to fix, obtain current KADM5 API header files and libraries and recompile application)"));
118 	case 35:
119 		return(dgettext(TEXT_DOMAIN,
120 			"Programmer error! Bad API version"));
121 	case 36:
122 		return(dgettext(TEXT_DOMAIN,
123 			"API version specified by application is no longer supported by libraries (to fix, update application to adhere to current API version and recompile)"));
124 	case 37:
125 		return(dgettext(TEXT_DOMAIN,
126 			"API version specified by application is no longer supported by server (to fix, update application to adhere to current API version and recompile)"));
127 	case 38:
128 		return(dgettext(TEXT_DOMAIN,
129 			"API version specified by application is unknown to libraries (to fix, obtain current KADM5 API header files and libraries and recompile application)"));
130 	case 39:
131 		return(dgettext(TEXT_DOMAIN,
132 			"API version specified by application is unknown to server (to fix, obtain and install newest KADM5 Admin Server)"));
133 	case 40:
134 		return(dgettext(TEXT_DOMAIN,
135 			"Database error! Required KADM5 principal missing"));
136 	case 41:
137 		return(dgettext(TEXT_DOMAIN,
138 			"The salt type of the specified principal does not support renaming"));
139 	case 42:
140 		return(dgettext(TEXT_DOMAIN,
141 			"Illegal configuration parameter for remote KADM5 client"));
142 	case 43:
143 		return(dgettext(TEXT_DOMAIN,
144 			"Illegal configuration parameter for local KADM5 client"));
145 	case 44:
146 		return(dgettext(TEXT_DOMAIN,
147 			"Operation requires ``list'' privilege"));
148 	case 45:
149 		return(dgettext(TEXT_DOMAIN,
150 			"Operation requires ``change-password'' privilege"));
151 	case 46:
152 		return(dgettext(TEXT_DOMAIN,
153 			"GSS-API (or Kerberos) error"));
154 	case 47:
155 		return(dgettext(TEXT_DOMAIN,
156 			"Programmer error! Illegal tagged data list type"));
157 	case 48:
158 		return(dgettext(TEXT_DOMAIN,
159 			"Required parameters in kdc.conf missing"));
160 	case 49:
161 		return(dgettext(TEXT_DOMAIN,
162 			"Bad krb5 admin server hostname"));
163 	case 50:
164 		return(dgettext(TEXT_DOMAIN,
165 			"Operation requires ``set-key'' privilege"));
166 	case 51:
167 		return(dgettext(TEXT_DOMAIN,
168 			"Multiple values for single or folded enctype"));
169 	case 52:
170 		return(dgettext(TEXT_DOMAIN,
171 			"Invalid enctype for setv4key"));
172 	case 53:
173 		return(dgettext(TEXT_DOMAIN,
174 			"Mismatched enctypes for setkey3"));
175 	case 54:
176 		return(dgettext(TEXT_DOMAIN,
177 			" RPC client cannot encode arguments."));
178 	case 55:
179 		return(dgettext(TEXT_DOMAIN,
180 			" RPC server cannot decode arguments."));
181 	default:
182 		return("unknown error");
183 	}
184 }
185