xref: /illumos-gate/usr/src/lib/gss_mechs/mech_krb5/et/prof_err.c (revision 1da57d551424de5a9d469760be7c4b4d4f10a755)
1 /*
2  * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
3  * Use is subject to license terms.
4  */
5 
6 #include <locale.h>
7 const char *
prof_error_table(long errorno)8 prof_error_table(long errorno) {
9 
10 switch (errorno) {
11 	case 0:
12 		return(dgettext(TEXT_DOMAIN,
13 			"Profile version 0.0"));
14 	case 1:
15 		return(dgettext(TEXT_DOMAIN,
16 			"Bad magic value in profile_node"));
17 	case 2:
18 		return(dgettext(TEXT_DOMAIN,
19 			"Profile section not found"));
20 	case 3:
21 		return(dgettext(TEXT_DOMAIN,
22 			"Profile relation not found"));
23 	case 4:
24 		return(dgettext(TEXT_DOMAIN,
25 			"Attempt to add a relation to node which is not a section"));
26 	case 5:
27 		return(dgettext(TEXT_DOMAIN,
28 			"A profile section header has a non-zero value"));
29 	case 6:
30 		return(dgettext(TEXT_DOMAIN,
31 			"Bad linked list in profile structures"));
32 	case 7:
33 		return(dgettext(TEXT_DOMAIN,
34 			"Bad group level in profile structures"));
35 	case 8:
36 		return(dgettext(TEXT_DOMAIN,
37 			"Bad parent pointer in profile structures"));
38 	case 9:
39 		return(dgettext(TEXT_DOMAIN,
40 			"Bad magic value in profile iterator"));
41 	case 10:
42 		return(dgettext(TEXT_DOMAIN,
43 			"Can't set value on section node"));
44 	case 11:
45 		return(dgettext(TEXT_DOMAIN,
46 			"Invalid argument passed to profile library"));
47 	case 12:
48 		return(dgettext(TEXT_DOMAIN,
49 			"Attempt to modify read-only profile"));
50 	case 13:
51 		return(dgettext(TEXT_DOMAIN,
52 			"Profile section header not at top level"));
53 	case 14:
54 		return(dgettext(TEXT_DOMAIN,
55 			"Syntax error in profile section header"));
56 	case 15:
57 		return(dgettext(TEXT_DOMAIN,
58 			"Syntax error in profile relation"));
59 	case 16:
60 		return(dgettext(TEXT_DOMAIN,
61 			"Extra closing brace in profile"));
62 	case 17:
63 		return(dgettext(TEXT_DOMAIN,
64 			"Missing open brace in profile"));
65 	case 18:
66 		return(dgettext(TEXT_DOMAIN,
67 			"Bad magic value in profile_t"));
68 	case 19:
69 		return(dgettext(TEXT_DOMAIN,
70 			"Bad magic value in profile_section_t"));
71 	case 20:
72 		return(dgettext(TEXT_DOMAIN,
73 			"Iteration through all top level section not supported"));
74 	case 21:
75 		return(dgettext(TEXT_DOMAIN,
76 			"Invalid profile_section object"));
77 	case 22:
78 		return(dgettext(TEXT_DOMAIN,
79 			"No more sections"));
80 	case 23:
81 		return(dgettext(TEXT_DOMAIN,
82 			"Bad nameset passed to query routine"));
83 	case 24:
84 		return(dgettext(TEXT_DOMAIN,
85 			"No profile file open"));
86 	case 25:
87 		return(dgettext(TEXT_DOMAIN,
88 			"Bad magic value in profile_file_t"));
89 	case 26:
90 		return(dgettext(TEXT_DOMAIN,
91 			"Couldn't open profile file"));
92 	case 27:
93 		return(dgettext(TEXT_DOMAIN,
94 			"Section already exists"));
95 	case 28:
96 		return(dgettext(TEXT_DOMAIN,
97 			"Invalid boolean value"));
98 	case 29:
99 		return(dgettext(TEXT_DOMAIN,
100 			"Invalid integer value"));
101 	case 30:
102 		return(dgettext(TEXT_DOMAIN,
103 			"Bad magic value in profile_file_data_t"));
104 	default:
105 		return("unknown error");
106 	}
107 }
108