Replace printf by puts for fixed strings. This would avoid issues caused
by formats introduced in translated strings.
This commit is contained in:
parent
1b246725c5
commit
01f9705dd5
@ -1,6 +1,7 @@
|
||||
2008-01-24 Nicolas François <nicolas.francois@centraliens.net>
|
||||
|
||||
* src/gpasswd.c, src/chfn.c, src/chage.c, src/chsh.c: Replace
|
||||
* src/gpasswd.c, src/chfn.c, src/chage.c, src/chsh.c, src/grpck.c,
|
||||
src/vipw.c, src/pwck.c, src/sulogin.c: Replace
|
||||
printf by puts for fixed strings. This would avoid issues caused
|
||||
by formats introduced in translated strings.
|
||||
|
||||
|
@ -416,7 +416,7 @@ static void check_grp_file (int *errors, int *changed)
|
||||
* Tell the user this entire line is bogus and ask
|
||||
* them to delete it.
|
||||
*/
|
||||
printf (_("invalid group file entry\n"));
|
||||
puts (_("invalid group file entry\n"));
|
||||
printf (_("delete line '%s'? "), gre->line);
|
||||
*errors += 1;
|
||||
|
||||
@ -476,7 +476,7 @@ static void check_grp_file (int *errors, int *changed)
|
||||
* Tell the user this entry is a duplicate of
|
||||
* another and ask them to delete it.
|
||||
*/
|
||||
printf (_("duplicate group entry\n"));
|
||||
puts (_("duplicate group entry\n"));
|
||||
printf (_("delete line '%s'? "), gre->line);
|
||||
*errors += 1;
|
||||
|
||||
@ -604,7 +604,7 @@ static void check_sgr_file (int *errors, int *changed)
|
||||
* Tell the user this entire line is bogus and ask
|
||||
* them to delete it.
|
||||
*/
|
||||
printf (_("invalid shadow group file entry\n"));
|
||||
puts (_("invalid shadow group file entry\n"));
|
||||
printf (_("delete line '%s'? "), sge->line);
|
||||
*errors += 1;
|
||||
|
||||
@ -664,7 +664,7 @@ static void check_sgr_file (int *errors, int *changed)
|
||||
* Tell the user this entry is a duplicate of
|
||||
* another and ask them to delete it.
|
||||
*/
|
||||
printf (_("duplicate shadow group entry\n"));
|
||||
puts (_("duplicate shadow group entry\n"));
|
||||
printf (_("delete line '%s'? "), sge->line);
|
||||
*errors += 1;
|
||||
|
||||
|
@ -276,7 +276,7 @@ static void check_pw_file (int *errors, int *changed)
|
||||
* Tell the user this entire line is bogus and ask
|
||||
* them to delete it.
|
||||
*/
|
||||
printf (_("invalid password file entry\n"));
|
||||
puts (_("invalid password file entry\n"));
|
||||
printf (_("delete line '%s'? "), pfe->line);
|
||||
*errors += 1;
|
||||
|
||||
@ -335,7 +335,7 @@ static void check_pw_file (int *errors, int *changed)
|
||||
* Tell the user this entry is a duplicate of
|
||||
* another and ask them to delete it.
|
||||
*/
|
||||
printf (_("duplicate password entry\n"));
|
||||
puts (_("duplicate password entry\n"));
|
||||
printf (_("delete line '%s'? "), pfe->line);
|
||||
*errors += 1;
|
||||
|
||||
@ -487,7 +487,7 @@ static void check_spw_file (int *errors, int *changed)
|
||||
* Tell the user this entire line is bogus and ask
|
||||
* them to delete it.
|
||||
*/
|
||||
printf (_("invalid shadow password file entry\n"));
|
||||
puts (_("invalid shadow password file entry\n"));
|
||||
printf (_("delete line '%s'? "), spe->line);
|
||||
*errors += 1;
|
||||
|
||||
@ -546,7 +546,7 @@ static void check_spw_file (int *errors, int *changed)
|
||||
* Tell the user this entry is a duplicate of
|
||||
* another and ask them to delete it.
|
||||
*/
|
||||
printf (_("duplicate shadow password entry\n"));
|
||||
puts (_("duplicate shadow password entry\n"));
|
||||
printf (_("delete line '%s'? "), spe->line);
|
||||
*errors += 1;
|
||||
|
||||
|
@ -121,7 +121,7 @@ static RETSIGTYPE catch_signals (unused int sig)
|
||||
}
|
||||
}
|
||||
if (access (PASSWD_FILE, F_OK) == -1) { /* must be a password file! */
|
||||
printf (_("No password file\n"));
|
||||
puts (_("No password file\n"));
|
||||
#ifdef USE_SYSLOG
|
||||
SYSLOG (LOG_WARN, "No password file\n");
|
||||
closelog ();
|
||||
@ -147,7 +147,7 @@ static RETSIGTYPE catch_signals (unused int sig)
|
||||
if (getppid() == 1) {
|
||||
setsid();
|
||||
if (ioctl(0, TIOCSCTTY, 1))
|
||||
fprintf(stderr,_("TIOCSCTTY failed"));
|
||||
fputs (_("TIOCSCTTY failed"), stderr);
|
||||
}
|
||||
while (*envp) /* add inherited environment, */
|
||||
addenv (*envp++, NULL); /* some variables change later */
|
||||
@ -171,7 +171,7 @@ static RETSIGTYPE catch_signals (unused int sig)
|
||||
/*
|
||||
* Fail secure
|
||||
*/
|
||||
printf (_("No password entry for 'root'\n"));
|
||||
puts (_("No password entry for 'root'\n"));
|
||||
#ifdef USE_SYSLOG
|
||||
SYSLOG (LOG_WARN, "No password entry for 'root'\n");
|
||||
closelog ();
|
||||
|
@ -66,7 +66,7 @@ static void vipwedit (const char *, int (*)(void), int (*)(void));
|
||||
*/
|
||||
static void usage (void)
|
||||
{
|
||||
fprintf (stderr, _("Usage: vipw [options]\n"
|
||||
fputs (_("Usage: vipw [options]\n"
|
||||
"\n"
|
||||
"Options:\n"
|
||||
" -g, --group edit group database\n"
|
||||
@ -74,7 +74,7 @@ static void usage (void)
|
||||
" -p, --passwd edit passwd database\n"
|
||||
" -q, --quiet quiet mode\n"
|
||||
" -s, --shadow edit shadow or gshadow database\n"
|
||||
"\n"));
|
||||
"\n"), stderr);
|
||||
exit (E_USAGE);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user