xref: /illumos-gate/usr/src/lib/gss_mechs/mech_krb5/et/kpasswd_strings.c (revision 1da57d551424de5a9d469760be7c4b4d4f10a755)
1 /*
2  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
3  * Use is subject to license terms.
4  */
5 
6 #include <locale.h>
7 const char *
kpws_error_table(long errorno)8 kpws_error_table(long errorno) {
9 
10 switch (errorno) {
11 	case 0:
12 		return(dgettext(TEXT_DOMAIN,
13 			"Usage: kpasswd [principal_name]."));
14 	case 1:
15 		return(dgettext(TEXT_DOMAIN,
16 			"Kerberos principal name %s is not recognized."));
17 	case 2:
18 		return(dgettext(TEXT_DOMAIN,
19 			"while reading principal name from credential cache."));
20 	case 3:
21 		return(dgettext(TEXT_DOMAIN,
22 			"Old Kerberos password is incorrect. Please try again."));
23 	case 4:
24 		return(dgettext(TEXT_DOMAIN,
25 			"Cannot establish a session with the Kerberos "
26 			"administrative server for realm %s. %s."));
27 	case 5:
28 		return(dgettext(TEXT_DOMAIN,
29 			"New passwords do not match - password not changed.\n"));
30 	case 6:
31 		return(dgettext(TEXT_DOMAIN,
32 			"Kerberos password changed.\n"));
33 	case 7:
34 		return(dgettext(TEXT_DOMAIN,
35 			"Password not changed."));
36 	case 8:
37 		return(dgettext(TEXT_DOMAIN,
38 			"when parsing name %s."));
39 	case 9:
40 		return(dgettext(TEXT_DOMAIN,
41 			"when unparsing name."));
42 	case 10:
43 		return(dgettext(TEXT_DOMAIN,
44 			"Unable to identify user from password file."));
45 	case 11:
46 		return(dgettext(TEXT_DOMAIN,
47 			"Changing password for %s."));
48 	case 12:
49 		return(dgettext(TEXT_DOMAIN,
50 			"Old password"));
51 	case 13:
52 		return(dgettext(TEXT_DOMAIN,
53 			"while reading new password."));
54 	case 14:
55 		return(dgettext(TEXT_DOMAIN,
56 			"You must type a password. "
57 			"Passwords must be at least one character long."));
58 	case 15:
59 		return(dgettext(TEXT_DOMAIN,
60 			"while trying to change password."));
61 	case 16:
62 		return(dgettext(TEXT_DOMAIN,
63 			"while closing session with admin server and "
64 		"destroying tickets."));
65 	case 17:
66 		return(dgettext(TEXT_DOMAIN,
67 			"while freeing admin principal entry"));
68 	case 18:
69 		return(dgettext(TEXT_DOMAIN,
70 			"while freeing admin policy entry"));
71 	case 19:
72 		return(dgettext(TEXT_DOMAIN,
73 			"Could not get password policy information for principal %s."));
74 	case 20:
75 		return(dgettext(TEXT_DOMAIN,
76 			"%s's password is controlled by the policy %s which\n"
77 		"requires a minimum of %u characters from at least %u classes \n"
78 		"(the five classes are lowercase, uppercase, numbers, punctuation,\n"
79 		"and all other characters)."));
80 	default:
81 		return("unknown error");
82 	}
83 }
84