* or not found, return.
*/
if (p == NULL) {
- fprintf(stderr, "%s: no entry for root\n", _PATH_PASSWD);
+ fprintf(stderr, _("%s: no entry for root\n"), _PATH_PASSWD);
return &pwd;
}
if (valid(pwd.pw_passwd))
*/
strcpy(pwd.pw_passwd, "");
if ((fp = fopen(_PATH_SHADOW_PASSWD, "r")) == NULL) {
- fprintf(stderr, "%s: root password garbled\n", _PATH_PASSWD);
+ fprintf(stderr, _("%s: root password garbled\n"), _PATH_PASSWD);
return &pwd;
}
while ((p = fgets(sline, 256, fp)) != NULL) {
* NULL it, and return.
*/
if (p == NULL) {
- fprintf(stderr, "%s: no entry for root\n", _PATH_SHADOW_PASSWD);
+ fprintf(stderr, _("%s: no entry for root\n"), _PATH_SHADOW_PASSWD);
strcpy(pwd.pw_passwd, "");
}
if (!valid(pwd.pw_passwd)) {
- fprintf(stderr, "%s: root password garbled\n", _PATH_SHADOW_PASSWD);
+ fprintf(stderr, _("%s: root password garbled\n"), _PATH_SHADOW_PASSWD);
strcpy(pwd.pw_passwd, "");
}
return &pwd;
size_t i;
if (crypted[0])
- printf("Give root password for maintenance\n");
+ printf(_("Give root password for maintenance\n"));
else
- printf("Press enter for maintenance");
- printf("(or type Control-D to continue): ");
+ printf(_("Press enter for maintenance"));
+ printf(_("(or type Control-D to continue): "));
fflush(stdout);
tcgetattr(0, &old);
if (getseuserbyname("root", &seuser, &level) == 0) {
if (get_default_context_with_level(seuser, level, 0, &scon) == 0) {
if (setexeccon(scon) != 0)
- fprintf(stderr, "setexeccon failed\n");
+ fprintf(stderr, _("setexeccon failed\n"));
freecon(scon);
}
}
fprintf(out, USAGE_OPTIONS);
fprintf(out, _(
" -p start a login shell\n"
- " -t SEC set max time to wait for a password (default: no limit)\n"
+ " -t SEC max time to wait for a password (default: no limit)\n"
" -e examine shadow files directly if getpwnam(3) fails\n"
" -h display this help message\n"));
}
if (geteuid() != 0) {
- fprintf(stderr, "sulogin: only root can run sulogin.\n");
+ fprintf(stderr, _("%s: only root can run this program.\n"),
+ program_invocation_short_name);
exit(1);
}
* Get the root password.
*/
if ((pwd = getrootpwent(opt_e)) == NULL) {
- fprintf(stderr, "sulogin: cannot open password database!\n");
+ fprintf(stderr, _("%s: cannot open password database.\n"),
+ program_invocation_short_name);
sleep(2);
}
mask_signal(SIGQUIT, SIG_IGN, &saved_sigquit);
mask_signal(SIGTSTP, SIG_IGN, &saved_sigtstp);
mask_signal(SIGINT, SIG_IGN, &saved_sigint);
- printf("Login incorrect.\n");
+ printf(_("Login incorrect\n"));
}
/*