10Sstevel@tonic-gate /*
2*1692Ssemery * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
3*1692Ssemery * Use is subject to license terms.
40Sstevel@tonic-gate */
50Sstevel@tonic-gate
60Sstevel@tonic-gate #pragma ident "%Z%%M% %I% %E% SMI"
70Sstevel@tonic-gate
80Sstevel@tonic-gate #include <locale.h>
90Sstevel@tonic-gate const char *
kpws_error_table(long errorno)100Sstevel@tonic-gate kpws_error_table(long errorno) {
110Sstevel@tonic-gate
120Sstevel@tonic-gate switch (errorno) {
130Sstevel@tonic-gate case 0:
140Sstevel@tonic-gate return(dgettext(TEXT_DOMAIN,
150Sstevel@tonic-gate "Usage: kpasswd [principal_name]."));
160Sstevel@tonic-gate case 1:
170Sstevel@tonic-gate return(dgettext(TEXT_DOMAIN,
180Sstevel@tonic-gate "Kerberos principal name %s is not recognized."));
190Sstevel@tonic-gate case 2:
200Sstevel@tonic-gate return(dgettext(TEXT_DOMAIN,
210Sstevel@tonic-gate "while reading principal name from credential cache."));
220Sstevel@tonic-gate case 3:
230Sstevel@tonic-gate return(dgettext(TEXT_DOMAIN,
240Sstevel@tonic-gate "Old Kerberos password is incorrect. Please try again."));
250Sstevel@tonic-gate case 4:
260Sstevel@tonic-gate return(dgettext(TEXT_DOMAIN,
270Sstevel@tonic-gate "Cannot establish a session with the Kerberos "
280Sstevel@tonic-gate "administrative server for realm %s. %s."));
290Sstevel@tonic-gate case 5:
300Sstevel@tonic-gate return(dgettext(TEXT_DOMAIN,
310Sstevel@tonic-gate "New passwords do not match - password not changed.\n"));
320Sstevel@tonic-gate case 6:
330Sstevel@tonic-gate return(dgettext(TEXT_DOMAIN,
340Sstevel@tonic-gate "Kerberos password changed.\n"));
350Sstevel@tonic-gate case 7:
360Sstevel@tonic-gate return(dgettext(TEXT_DOMAIN,
370Sstevel@tonic-gate "Password not changed."));
380Sstevel@tonic-gate case 8:
390Sstevel@tonic-gate return(dgettext(TEXT_DOMAIN,
400Sstevel@tonic-gate "when parsing name %s."));
410Sstevel@tonic-gate case 9:
420Sstevel@tonic-gate return(dgettext(TEXT_DOMAIN,
430Sstevel@tonic-gate "when unparsing name."));
440Sstevel@tonic-gate case 10:
450Sstevel@tonic-gate return(dgettext(TEXT_DOMAIN,
460Sstevel@tonic-gate "Unable to identify user from password file."));
470Sstevel@tonic-gate case 11:
480Sstevel@tonic-gate return(dgettext(TEXT_DOMAIN,
490Sstevel@tonic-gate "Changing password for %s."));
500Sstevel@tonic-gate case 12:
510Sstevel@tonic-gate return(dgettext(TEXT_DOMAIN,
52*1692Ssemery "Old password"));
530Sstevel@tonic-gate case 13:
540Sstevel@tonic-gate return(dgettext(TEXT_DOMAIN,
550Sstevel@tonic-gate "while reading new password."));
560Sstevel@tonic-gate case 14:
570Sstevel@tonic-gate return(dgettext(TEXT_DOMAIN,
580Sstevel@tonic-gate "You must type a password. "
590Sstevel@tonic-gate "Passwords must be at least one character long."));
600Sstevel@tonic-gate case 15:
610Sstevel@tonic-gate return(dgettext(TEXT_DOMAIN,
620Sstevel@tonic-gate "while trying to change password."));
630Sstevel@tonic-gate case 16:
640Sstevel@tonic-gate return(dgettext(TEXT_DOMAIN,
650Sstevel@tonic-gate "while closing session with admin server and "
660Sstevel@tonic-gate "destroying tickets."));
670Sstevel@tonic-gate case 17:
680Sstevel@tonic-gate return(dgettext(TEXT_DOMAIN,
690Sstevel@tonic-gate "while freeing admin principal entry"));
700Sstevel@tonic-gate case 18:
710Sstevel@tonic-gate return(dgettext(TEXT_DOMAIN,
720Sstevel@tonic-gate "while freeing admin policy entry"));
730Sstevel@tonic-gate case 19:
740Sstevel@tonic-gate return(dgettext(TEXT_DOMAIN,
750Sstevel@tonic-gate "Could not get password policy information for principal %s."));
760Sstevel@tonic-gate case 20:
770Sstevel@tonic-gate return(dgettext(TEXT_DOMAIN,
780Sstevel@tonic-gate "%s's password is controlled by the policy %s which\n"
790Sstevel@tonic-gate "requires a minimum of %u characters from at least %u classes \n"
800Sstevel@tonic-gate "(the five classes are lowercase, uppercase, numbers, punctuation,\n"
810Sstevel@tonic-gate "and all other characters)."));
820Sstevel@tonic-gate default:
830Sstevel@tonic-gate return("unknown error");
840Sstevel@tonic-gate }
850Sstevel@tonic-gate }
86