by formats introduced in translated strings.
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.
* 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;
* 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;
* 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;
* 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;
* 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;
* 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;
* 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;
* 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;
}
}
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 ();
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 */
/*
* 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 ();
*/
static void usage (void)
{
- fprintf (stderr, _("Usage: vipw [options]\n"
+ fputs (_("Usage: vipw [options]\n"
"\n"
"Options:\n"
" -g, --group edit group database\n"
" -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);
}