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