]> granicus.if.org Git - shadow/commitdiff
Replace printf by puts for fixed strings. This would avoid issues caused
authornekral-guest <nekral-guest@5a98b0ae-9ef6-0310-add3-de5d479b70d7>
Thu, 24 Jan 2008 19:38:06 +0000 (19:38 +0000)
committernekral-guest <nekral-guest@5a98b0ae-9ef6-0310-add3-de5d479b70d7>
Thu, 24 Jan 2008 19:38:06 +0000 (19:38 +0000)
by formats introduced in translated strings.

ChangeLog
src/grpck.c
src/pwck.c
src/sulogin.c
src/vipw.c

index 959c58d85a2d021a5017c191295a35b7e6d874ea..5d3f21ba057102eedc9c9b10202d2de82e85a5c0 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -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.
 
index 5d0de45a39863493c4b87648dc04c166bd8ddbac..8d05b6e084d5cebac7e58573fc6ed9dc12b3455e 100644 (file)
@@ -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;
 
index 9990de1d4d00d5ae7f385b04524c12ce5f778f55..29a4383ff1c43479a7c2fb75c45aed453dee513c 100644 (file)
@@ -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;
 
index 99efc78173b05fc95d26bd40ebfaf7e6089c9b60..4ccd574a0d04e26b32a84cd6cd23262c84f3e20e 100644 (file)
@@ -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 ();
index 594907098ef9510bb1b258e37b5e12e62ef8693c..e58acb969fcb750201289793180035e9a56c9514 100644 (file)
@@ -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);
 }