xref: /illumos-gate/usr/src/lib/gss_mechs/mech_krb5/et/chpass_util_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 *
ovku_error_table(long errorno)8 ovku_error_table(long errorno) {
9 
10 switch (errorno) {
11 	case 0:
12 		return (dgettext(TEXT_DOMAIN,
13 			"while getting policy info.\n"));
14 	case 1:
15 		return (dgettext(TEXT_DOMAIN,
16 			"while getting principal info.\n"));
17 	case 2:
18 		return (dgettext(TEXT_DOMAIN,
19 			"New passwords do not match - password not "
20 				"changed.\n"));
21 	case 3:
22 		return (dgettext(TEXT_DOMAIN,
23 			"New password"));
24 	case 4:
25 		return (dgettext(TEXT_DOMAIN,
26 			"New password (again)"));
27 	case 5:
28 		return (dgettext(TEXT_DOMAIN,
29 			"You must type a password. Passwords"
30 			"must be at least one character long.\n"));
31 	case 6:
32 		return (dgettext(TEXT_DOMAIN,
33 			"yet no policy set!  Contact your "
34 			"system security administrator.\n"));
35 	case 7:
36 		return (dgettext(TEXT_DOMAIN,
37 			"Password changed.\n"));
38 	case 8:
39 		return (dgettext(TEXT_DOMAIN,
40 			"New password was found in a "
41 				"dictionary of possible passwords "
42 				"and therefore may be easily "
43 				"guessed.\nPlease choose another "
44 				"password.\nSee "
45 				"the kpasswd man page for help in "
46 				"choosing a "
47 				"good password.\n"));
48 	case 9:
49 		return (dgettext(TEXT_DOMAIN,
50 			"Password not changed.\n"));
51 	case 10:
52 		return (dgettext(TEXT_DOMAIN,
53 			"New password is too short.\nPlease "
54 				"choose a "
55 				"password which is at least %d "
56 				"characters long.\n"));
57 	case 11:
58 		return (dgettext(TEXT_DOMAIN,
59 			"New password does not have enough "
60 				"character classes.\nThe character "
61 				"classes are:\n"
62 				"	- lower-case letters,\n"
63 				"	- upper-case letters,\n"
64 				"	- digits,\n"
65 				"	- punctuation, and\n"
66 				"	- all "
67 				"other characters (e.g., control characters).\n"
68 				"Please choose a password with at least %d "
69 				"character classes.\n"));
70 	case 12:
71 		return (dgettext(TEXT_DOMAIN,
72 			"Password cannot be changed because it was "
73 				"changed too recently.\nPlease wait until %s "
74 				"before you change it.\nIf you need to change "
75 				"your password before then, "
76 				"contact your system "
77 				"security administrator.\n"));
78 	case 13:
79 		return (dgettext(TEXT_DOMAIN,
80 			"New password was used previously."
81 				" Please choose "
82 				"a different password.\n"));
83 	case 14:
84 		return (dgettext(TEXT_DOMAIN,
85 			"while trying to change password.\n"));
86 	case 15:
87 		return (dgettext(TEXT_DOMAIN,
88 			"while reading new password.\n"));
89 	default:
90 		return ("unknown error");
91 	}
92 }
93