1 /*
2 * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
3 * Use is subject to license terms.
4 */
5
6 #include <locale.h>
7 const char *
ggss_error_table(long errorno)8 ggss_error_table(long errorno) {
9
10 switch (errorno) {
11 case 0:
12 return (dgettext(TEXT_DOMAIN,
13 "No @ in SERVICE-NAME name string"));
14 case 1:
15 return (dgettext(TEXT_DOMAIN,
16 "STRING-UID-NAME contains nondigits"));
17 case 2:
18 return (dgettext(TEXT_DOMAIN,
19 "UID does not resolve to username"));
20 case 3:
21 return (dgettext(TEXT_DOMAIN,
22 "Validation error"));
23 case 4:
24 return (dgettext(TEXT_DOMAIN,
25 "Couldn't allocate gss_buffer_t data"));
26 case 5:
27 return (dgettext(TEXT_DOMAIN,
28 "Message context invalid"));
29 case 6:
30 return (dgettext(TEXT_DOMAIN,
31 "Buffer is the wrong size"));
32 case 7:
33 return (dgettext(TEXT_DOMAIN,
34 "Credential usage type is unknown"));
35 case 8:
36 return (dgettext(TEXT_DOMAIN,
37 "Unknown quality of protection specified"));
38 case 9:
39 return (dgettext(TEXT_DOMAIN,
40 "Local host name could not be determined"));
41 case 10:
42 return (dgettext(TEXT_DOMAIN,
43 "Hostname in SERVICE-NAME string could not be"
44 " canonicalized"));
45 case 11:
46 return (dgettext(TEXT_DOMAIN,
47 "Mechanism is incorrect"));
48 case 12:
49 return (dgettext(TEXT_DOMAIN,
50 "Token header is malformed or corrupt"));
51 case 13:
52 return (dgettext(TEXT_DOMAIN,
53 "Packet was replayed in wrong direction"));
54 case 14:
55 return (dgettext(TEXT_DOMAIN,
56 "Token is missing data"));
57 case 15:
58 return (dgettext(TEXT_DOMAIN,
59 "Token was reflected"));
60 case 16:
61 return (dgettext(TEXT_DOMAIN,
62 "Received token ID does not match expected token ID"));
63 case 17:
64 return (dgettext(TEXT_DOMAIN,
65 "The given credential's usage does not match the"
66 " requested usage"));
67 case 18:
68 return (dgettext(TEXT_DOMAIN,
69 "Storing of acceptor credentials is not supported by"
70 " the mechanism"));
71 case 19:
72 return (dgettext(TEXT_DOMAIN,
73 "Storing of non-default credentials is not supported by"
74 " the mechanism"));
75 default:
76 return ("unknown error");
77 }
78 }
79