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