17c478bd9Sstevel@tonic-gate /*
2e49962a0Ssemery * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
3e49962a0Ssemery * Use is subject to license terms.
47c478bd9Sstevel@tonic-gate */
57c478bd9Sstevel@tonic-gate
67c478bd9Sstevel@tonic-gate #include <locale.h>
77c478bd9Sstevel@tonic-gate const char *
ovku_error_table(long errorno)87c478bd9Sstevel@tonic-gate ovku_error_table(long errorno) {
97c478bd9Sstevel@tonic-gate
107c478bd9Sstevel@tonic-gate switch (errorno) {
117c478bd9Sstevel@tonic-gate case 0:
127c478bd9Sstevel@tonic-gate return (dgettext(TEXT_DOMAIN,
137c478bd9Sstevel@tonic-gate "while getting policy info.\n"));
147c478bd9Sstevel@tonic-gate case 1:
157c478bd9Sstevel@tonic-gate return (dgettext(TEXT_DOMAIN,
167c478bd9Sstevel@tonic-gate "while getting principal info.\n"));
177c478bd9Sstevel@tonic-gate case 2:
187c478bd9Sstevel@tonic-gate return (dgettext(TEXT_DOMAIN,
197c478bd9Sstevel@tonic-gate "New passwords do not match - password not "
207c478bd9Sstevel@tonic-gate "changed.\n"));
217c478bd9Sstevel@tonic-gate case 3:
227c478bd9Sstevel@tonic-gate return (dgettext(TEXT_DOMAIN,
23e49962a0Ssemery "New password"));
247c478bd9Sstevel@tonic-gate case 4:
257c478bd9Sstevel@tonic-gate return (dgettext(TEXT_DOMAIN,
26e49962a0Ssemery "New password (again)"));
277c478bd9Sstevel@tonic-gate case 5:
287c478bd9Sstevel@tonic-gate return (dgettext(TEXT_DOMAIN,
297c478bd9Sstevel@tonic-gate "You must type a password. Passwords"
307c478bd9Sstevel@tonic-gate "must be at least one character long.\n"));
317c478bd9Sstevel@tonic-gate case 6:
327c478bd9Sstevel@tonic-gate return (dgettext(TEXT_DOMAIN,
337c478bd9Sstevel@tonic-gate "yet no policy set! Contact your "
347c478bd9Sstevel@tonic-gate "system security administrator.\n"));
357c478bd9Sstevel@tonic-gate case 7:
367c478bd9Sstevel@tonic-gate return (dgettext(TEXT_DOMAIN,
377c478bd9Sstevel@tonic-gate "Password changed.\n"));
387c478bd9Sstevel@tonic-gate case 8:
397c478bd9Sstevel@tonic-gate return (dgettext(TEXT_DOMAIN,
407c478bd9Sstevel@tonic-gate "New password was found in a "
417c478bd9Sstevel@tonic-gate "dictionary of possible passwords "
427c478bd9Sstevel@tonic-gate "and therefore may be easily "
437c478bd9Sstevel@tonic-gate "guessed.\nPlease choose another "
447c478bd9Sstevel@tonic-gate "password.\nSee "
457c478bd9Sstevel@tonic-gate "the kpasswd man page for help in "
467c478bd9Sstevel@tonic-gate "choosing a "
477c478bd9Sstevel@tonic-gate "good password.\n"));
487c478bd9Sstevel@tonic-gate case 9:
497c478bd9Sstevel@tonic-gate return (dgettext(TEXT_DOMAIN,
507c478bd9Sstevel@tonic-gate "Password not changed.\n"));
517c478bd9Sstevel@tonic-gate case 10:
527c478bd9Sstevel@tonic-gate return (dgettext(TEXT_DOMAIN,
537c478bd9Sstevel@tonic-gate "New password is too short.\nPlease "
547c478bd9Sstevel@tonic-gate "choose a "
557c478bd9Sstevel@tonic-gate "password which is at least %d "
567c478bd9Sstevel@tonic-gate "characters long.\n"));
577c478bd9Sstevel@tonic-gate case 11:
587c478bd9Sstevel@tonic-gate return (dgettext(TEXT_DOMAIN,
597c478bd9Sstevel@tonic-gate "New password does not have enough "
607c478bd9Sstevel@tonic-gate "character classes.\nThe character "
617c478bd9Sstevel@tonic-gate "classes are:\n"
627c478bd9Sstevel@tonic-gate " - lower-case letters,\n"
637c478bd9Sstevel@tonic-gate " - upper-case letters,\n"
647c478bd9Sstevel@tonic-gate " - digits,\n"
657c478bd9Sstevel@tonic-gate " - punctuation, and\n"
667c478bd9Sstevel@tonic-gate " - all "
677c478bd9Sstevel@tonic-gate "other characters (e.g., control characters).\n"
687c478bd9Sstevel@tonic-gate "Please choose a password with at least %d "
697c478bd9Sstevel@tonic-gate "character classes.\n"));
707c478bd9Sstevel@tonic-gate case 12:
717c478bd9Sstevel@tonic-gate return (dgettext(TEXT_DOMAIN,
727c478bd9Sstevel@tonic-gate "Password cannot be changed because it was "
737c478bd9Sstevel@tonic-gate "changed too recently.\nPlease wait until %s "
747c478bd9Sstevel@tonic-gate "before you change it.\nIf you need to change "
757c478bd9Sstevel@tonic-gate "your password before then, "
76*2278144aSsemery "contact your system "
777c478bd9Sstevel@tonic-gate "security administrator.\n"));
787c478bd9Sstevel@tonic-gate case 13:
797c478bd9Sstevel@tonic-gate return (dgettext(TEXT_DOMAIN,
807c478bd9Sstevel@tonic-gate "New password was used previously."
817c478bd9Sstevel@tonic-gate " Please choose "
827c478bd9Sstevel@tonic-gate "a different password.\n"));
837c478bd9Sstevel@tonic-gate case 14:
847c478bd9Sstevel@tonic-gate return (dgettext(TEXT_DOMAIN,
857c478bd9Sstevel@tonic-gate "while trying to change password.\n"));
867c478bd9Sstevel@tonic-gate case 15:
877c478bd9Sstevel@tonic-gate return (dgettext(TEXT_DOMAIN,
887c478bd9Sstevel@tonic-gate "while reading new password.\n"));
897c478bd9Sstevel@tonic-gate default:
907c478bd9Sstevel@tonic-gate return ("unknown error");
917c478bd9Sstevel@tonic-gate }
927c478bd9Sstevel@tonic-gate }
93