]> git.ipfire.org Git - thirdparty/shadow.git/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 20:42:12 +0000 (20:42 +0000)
committernekral-guest <nekral-guest@5a98b0ae-9ef6-0310-add3-de5d479b70d7>
Thu, 24 Jan 2008 20:42:12 +0000 (20:42 +0000)
by formats introduced in translated strings.

17 files changed:
ChangeLog
src/expiry.c
src/faillog.c
src/groupadd.c
src/groupdel.c
src/groupmems.c
src/groupmod.c
src/id.c
src/lastlog.c
src/login.c
src/newgrp.c
src/passwd.c
src/su.c
src/suauth.c
src/useradd.c
src/userdel.c
src/usermod.c

index 5d3f21ba057102eedc9c9b10202d2de82e85a5c0..91c52c34e771cf556acf3daaa8905cf395839cb7 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,7 +1,11 @@
 2008-01-24  Nicolas François  <nicolas.francois@centraliens.net>
 
        * 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
+       src/vipw.c, src/pwck.c, src/sulogin.c, src/newgrp.c,
+       src/userdel.c, src/lastlog.c, src/groupmems.c, src/usermod.c,
+       src/expiry.c, src/groupdel.c, src/useradd.c, src/su.c,
+       src/groupmod.c, src/passwd.c, src/groupadd.c, src/login.c,
+       src/suauth.c, src/faillog.c, src/id.c: Replace
        printf by puts for fixed strings. This would avoid issues caused
        by formats introduced in translated strings.
 
index 1a66d7f5556bee0b617b3c09d4d2f5d1041d6fd5..3da496c3552cf65b4923956e38e849807d069a45 100644 (file)
@@ -54,7 +54,7 @@ static RETSIGTYPE catch_signals (unused int sig)
  */
 static void usage (void)
 {
-       fprintf (stderr, _("Usage: expiry {-f|-c}\n"));
+       fputs (_("Usage: expiry {-f|-c}\n"), stderr);
        exit (10);
 }
 
index 1b3fd26ea2517ee950958d3c6a99139acd3ced75..a3120d9d64f533a1dc3d105a8afe9d16e3cf359c 100644 (file)
@@ -60,7 +60,7 @@ static struct stat statbuf;   /* fstat buffer for file size */
 
 static void usage (void)
 {
-       fprintf (stderr, _("Usage: faillog [options]\n"
+       fputs (_("Usage: faillog [options]\n"
                           "\n"
                           "Options:\n"
                           "  -a, --all                     display faillog records for all users\n"
@@ -72,7 +72,7 @@ static void usage (void)
                           "  -u, --user LOGIN              display faillog record or maintains failure\n"
                           "                                counters and limits (if used with -r, -m or -l\n"
                           "                                options) only for user with LOGIN\n"
-                          "\n"));
+                          "\n"), stderr);
        exit (E_USAGE);
 }
 
@@ -89,8 +89,7 @@ static void print_one (const struct faillog *fl, uid_t uid)
 #endif
 
        if (!once) {
-               printf (_
-                       ("Login       Failures Maximum Latest                   On\n"));
+               puts (_("Login       Failures Maximum Latest                   On\n"));
                once++;
        }
        pwent = getpwuid (uid); /* local, no need for xgetpwuid */
index 9e4a70be4b34160540889c6bcadab8cb9c765bcd..abe1f2d125d1e5c6616a7c07cb642e472c09361c 100644 (file)
@@ -105,7 +105,7 @@ static void check_perms (void);
  */
 static void usage (void)
 {
-       fprintf (stderr, _("Usage: groupadd [options] GROUP\n"
+       fputs (_("Usage: groupadd [options] GROUP\n"
                           "\n"
                           "Options:\n"
                           "  -f, --force                   force exit with success status if the\n"
@@ -115,7 +115,7 @@ static void usage (void)
                           "  -K, --key KEY=VALUE           overrides /etc/login.defs defaults\n"
                           "  -o, --non-unique              allow create group with duplicate\n"
                           "                                (non-unique) GID\n"
-                          "\n"));
+                          "\n"), stderr);
        exit (E_USAGE);
 }
 
index f89f7066e7f275f5ffbff13afb73605a7848bdf7..4982f70158d9bd42bc34b50fc22a24e68818b286 100644 (file)
@@ -80,7 +80,7 @@ static void group_busy (gid_t);
  */
 static void usage (void)
 {
-       fprintf (stderr, _("Usage: groupdel group\n"));
+       fputs (_("Usage: groupdel group\n"), stderr);
        exit (E_USAGE);
 }
 
index 3fb982de5517c9479e335e3114c1ad4925f42bc5..67cb77125acc40e03367237ef93f50f9c7d83620 100644 (file)
@@ -99,7 +99,7 @@ static void addtogroup (char *user, char **members)
 
        for (i = 0; NULL != members[i]; i++) {
                if (0 == strcmp (user, members[i])) {
-                       fprintf (stderr, _("Member already exists\n"));
+                       fputs (_("Member already exists\n"), stderr);
                        exit (EXIT_MEMBER_EXISTS);
                }
        }
@@ -129,7 +129,7 @@ static void rmfromgroup (char *user, char **members)
        }
 
        if (!found) {
-               fprintf (stderr, _("Member to remove could not be found\n"));
+               fputs (_("Member to remove could not be found\n"), stderr);
                exit (EXIT_NOT_MEMBER);
        }
 }
@@ -160,9 +160,7 @@ static void members (char **members)
 
 static void usage (void)
 {
-       fprintf (stderr,
-                _
-                ("Usage: groupmems -a username | -d username | -D | -l [-g groupname]\n"));
+       fputs (_("Usage: groupmems -a username | -d username | -D | -l [-g groupname]\n"), stderr);
        exit (EXIT_USAGE);
 }
 
@@ -224,16 +222,16 @@ int main (int argc, char **argv)
        }
 
        if (!isroot () && NULL != thisgroup) {
-               fprintf (stderr,
-                        _("Only root can add members to different groups\n"));
+               fputs (_("Only root can add members to different groups\n"),
+                      stderr);
                exit (EXIT_NOT_ROOT);
        } else if (isroot () && NULL != thisgroup) {
                name = thisgroup;
        } else if (!isgroup ()) {
-               fprintf (stderr, _("Group access is required\n"));
+               fputs (_("Group access is required\n"), stderr);
                exit (EXIT_NOT_EROOT);
        } else if (NULL == (name = whoami ())) {
-               fprintf (stderr, _("Not primary owner of current group\n"));
+               fputs (_("Not primary owner of current group\n"), stderr);
                exit (EXIT_NOT_PRIMARY);
        }
 #ifdef USE_PAM
@@ -267,18 +265,18 @@ int main (int argc, char **argv)
        }
 
        if (retval != PAM_SUCCESS) {
-               fprintf (stderr, _("PAM authentication failed for\n"));
+               fputs (_("PAM authentication failed for\n"), stderr);
                exit (1);
        }
 #endif
 
        if (!gr_lock ()) {
-               fprintf (stderr, _("Unable to lock group file\n"));
+               fputs (_("Unable to lock group file\n"), stderr);
                exit (EXIT_GROUP_FILE);
        }
 
        if (!gr_open (O_RDWR)) {
-               fprintf (stderr, _("Unable to open group file\n"));
+               fputs (_("Unable to open group file\n"), stderr);
                exit (EXIT_GROUP_FILE);
        }
 
@@ -298,7 +296,7 @@ int main (int argc, char **argv)
        }
 
        if (!gr_close ()) {
-               fprintf (stderr, _("Cannot close group file\n"));
+               fputs (_("Cannot close group file\n"), stderr);
                exit (EXIT_GROUP_FILE);
        }
 
index 5899048a81f1740c697c1ef414b0ae24a0981def..d689a216b0ca6f687341caff6e41a61341bca189 100644 (file)
@@ -100,7 +100,7 @@ static gid_t get_gid (const char *gidstr);
 
 static void usage (void)
 {
-       fprintf (stderr, _("Usage: groupmod [options] GROUP\n"
+       fputs (_("Usage: groupmod [options] GROUP\n"
                           "\n"
                           "Options:\n"
                           "  -g, --gid GID                 force use new GID by GROUP\n"
@@ -108,7 +108,7 @@ static void usage (void)
                           "  -n, --new-name NEW_GROUP      force use NEW_GROUP name by GROUP\n"
                           "  -o, --non-unique              allow using duplicate (non-unique) GID by GROUP\n"
                           "  -p, --password PASSWORD       use encrypted password for the new password\n"
-                          "\n"));
+                          "\n"), stderr);
        exit (E_USAGE);
 }
 
index d26d2a633ed06e2805f5307315f08838242a0d1c..fc0379a254b9befef022ca22a7a9877f3e90b9f4 100644 (file)
--- a/src/id.c
+++ b/src/id.c
@@ -50,9 +50,9 @@ static void usage (void);
 static void usage (void)
 {
 #ifdef HAVE_GETGROUPS
-       fprintf (stderr, _("Usage: id [-a]\n"));
+       fputs (_("Usage: id [-a]\n"), stderr);
 #else
-       fprintf (stderr, _("Usage: id\n"));
+       fputs (_("Usage: id\n"), stderr);
 #endif
        exit (1);
 }
@@ -164,7 +164,7 @@ static void usage (void)
                 * where "###" is a numerical value and "aaa" is the
                 * corresponding name for each respective numerical value.
                 */
-               printf (_(" groups="));
+               puts (_(" groups="));
                for (i = 0; i < ngroups; i++) {
                        if (i)
                                putchar (',');
index 361af907082894cf913f5cb68fb1444708d39501..37ebeb22ba78100ef28c415ba2e84e398dd606e5 100644 (file)
@@ -68,14 +68,14 @@ static struct passwd *pwent;
 
 static void usage (void)
 {
-       fprintf (stdout, _("Usage: lastlog [options]\n"
+       fputs (_("Usage: lastlog [options]\n"
                           "\n"
                           "Options:\n"
                           "  -b, --before DAYS             print only lastlog records older than DAYS\n"
                           "  -h, --help                    display this help message and exit\n"
                           "  -t, --time DAYS               print only lastlog records more recent than DAYS\n"
                           "  -u, --user LOGIN              print lastlog record of the specified LOGIN\n"
-                          "\n"));
+                          "\n"), stderr);
        exit (1);
 }
 
@@ -95,10 +95,9 @@ static void print_one (const struct passwd *pw)
 
        if (!once) {
 #ifdef HAVE_LL_HOST
-               printf (_
-                       ("Username         Port     From             Latest\n"));
+               puts (_("Username         Port     From             Latest\n"));
 #else
-               printf (_("Username                Port     Latest\n"));
+               puts (_("Username                Port     Latest\n"));
 #endif
                once++;
        }
index 8dcb755c9a0c4c51cb3359cdc064cc7a2b79495e..00d82e743e84acad29673a29f2c6d2a302c694ba 100644 (file)
@@ -189,7 +189,7 @@ static void setup_tty (void)
  */
 static void bad_time_notify (void)
 {
-       printf (_("Invalid login time\n"));
+       puts (_("Invalid login time\n"));
        fflush (stdout);
 }
 
@@ -223,7 +223,7 @@ static void check_nologin (void)
                        fflush (stdout);
                        fclose (nlfp);
                } else
-                       printf (_("\nSystem closed for routine maintenance\n"));
+                       puts (_("\nSystem closed for routine maintenance\n"));
                /*
                 * Non-root users must exit. Root gets the message, but
                 * gets to login.
@@ -233,7 +233,7 @@ static void check_nologin (void)
                        closelog ();
                        exit (0);
                }
-               printf (_("\n[Disconnect bypassed -- root login allowed.]\n"));
+               puts (_("\n[Disconnect bypassed -- root login allowed.]\n"));
        }
 }
 #endif                         /* !USE_PAM */
@@ -675,7 +675,7 @@ int main (int argc, char **argv)
                            exit(0);
                          } else if (retcode == PAM_ABORT) {
                            /* Serious problems, quit now */
-                           fprintf(stderr,_("login: abort requested by PAM\n"));
+                           fputs (_("login: abort requested by PAM\n"),stderr);
                            SYSLOG ((LOG_ERR,"PAM_ABORT returned from pam_authenticate()"));
                            PAM_END;
                            exit(99);
index de06dbed28372f16a7a68c5924c1bf9d52fa4917..c7ed8951491521bd58ed95494d02086ba1240905 100644 (file)
@@ -66,9 +66,9 @@ static void syslog_sg (const char *name, const char *group);
 static void usage (void)
 {
        if (is_newgrp)
-               fprintf (stderr, _("Usage: newgrp [-] [group]\n"));
+               fputs (_("Usage: newgrp [-] [group]\n"), stderr);
        else
-               fprintf (stderr, _("Usage: sg group [[-c] command]\n"));
+               fputs (_("Usage: sg group [[-c] command]\n"), stderr);
 }
 
 /*
@@ -580,7 +580,7 @@ int main (int argc, char **argv)
        }
        if (i == ngroups) {
                if (ngroups >= sysconf (_SC_NGROUPS_MAX)) {
-                       fprintf (stderr, _("too many groups\n"));
+                       fputs (_("too many groups\n"), stderr);
                } else {
                        grouplist[ngroups++] = gid;
                        if (setgroups (ngroups, grouplist)) {
index a6b5643c0787d811c556c827f0873a432d8acf61..cfe9d340cd8054f8517ff2a856d1d4c16428addf 100644 (file)
@@ -143,7 +143,7 @@ static long getnumber (const char *);
  */
 static void usage (int status)
 {
-       fprintf (stderr, _("Usage: passwd [options] [LOGIN]\n"
+       fputs (_("Usage: passwd [options] [LOGIN]\n"
                           "\n"
                           "Options:\n"
                           "  -a, --all                     report password status on all accounts\n"
@@ -163,7 +163,7 @@ static void usage (int status)
                           "  -w, --warndays WARN_DAYS      set expiration warning days to WARN_DAYS\n"
                           "  -x, --maxdays MAX_DAYS        set maximim number of days before password\n"
                           "                                change to MAX_DAYS\n"
-                          "\n"));
+                          "\n"), stderr);
        exit (status);
 }
 
@@ -282,7 +282,7 @@ static int new_password (const struct passwd *pw)
                strzero (cp);
 
                if (!amroot && (!obscure (orig, pass, pw) || reuse (pass, pw))) {
-                       printf (_("Try again.\n"));
+                       puts (_("Try again.\n"));
                        continue;
                }
 
@@ -293,8 +293,7 @@ static int new_password (const struct passwd *pw)
                 */
                if (amroot && !warned && getdef_bool ("PASS_ALWAYS_WARN")
                    && (!obscure (orig, pass, pw) || reuse (pass, pw))) {
-                       printf (_
-                               ("\nWarning: weak password (enter it again to use it anyway).\n"));
+                       puts (_("\nWarning: weak password (enter it again to use it anyway).\n"));
                        warned++;
                        continue;
                }
@@ -303,7 +302,7 @@ static int new_password (const struct passwd *pw)
                        return -1;
                }
                if (strcmp (cp, pass))
-                       fprintf (stderr, _("They don't match; try again.\n"));
+                       fputs (_("They don't match; try again.\n"), stderr);
                else {
                        strzero (cp);
                        break;
@@ -498,14 +497,13 @@ static void update_noshadow (void)
        struct passwd *npw;
 
        if (!pw_lock ()) {
-               fprintf (stderr,
-                        _
-                        ("Cannot lock the password file; try again later.\n"));
+               fputs (_("Cannot lock the password file; try again later.\n"),
+                      stderr);
                SYSLOG ((LOG_WARN, "can't lock password file"));
                exit (E_PWDBUSY);
        }
        if (!pw_open (O_RDWR)) {
-               fprintf (stderr, _("Cannot open the password file.\n"));
+               fputs (_("Cannot open the password file.\n"), stderr);
                SYSLOG ((LOG_ERR, "can't open password file"));
                fail_exit (E_MISSING);
        }
@@ -520,12 +518,12 @@ static void update_noshadow (void)
                oom ();
        npw->pw_passwd = update_crypt_pw (npw->pw_passwd);
        if (!pw_update (npw)) {
-               fprintf (stderr, _("Error updating the password entry.\n"));
+               fputs (_("Error updating the password entry.\n"), stderr);
                SYSLOG ((LOG_ERR, "error updating password entry"));
                fail_exit (E_FAILURE);
        }
        if (!pw_close ()) {
-               fprintf (stderr, _("Cannot commit password file changes.\n"));
+               fputs (_("Cannot commit password file changes.\n"), stderr);
                SYSLOG ((LOG_ERR, "can't rewrite password file"));
                fail_exit (E_FAILURE);
        }
@@ -538,14 +536,13 @@ static void update_shadow (void)
        struct spwd *nsp;
 
        if (!spw_lock ()) {
-               fprintf (stderr,
-                        _
-                        ("Cannot lock the password file; try again later.\n"));
+               fputs (_("Cannot lock the password file; try again later.\n"),
+                      stderr);
                SYSLOG ((LOG_WARN, "can't lock password file"));
                exit (E_PWDBUSY);
        }
        if (!spw_open (O_RDWR)) {
-               fprintf (stderr, _("Cannot open the password file.\n"));
+               fputs (_("Cannot open the password file.\n"), stderr);
                SYSLOG ((LOG_ERR, "can't open password file"));
                fail_exit (E_FAILURE);
        }
@@ -590,12 +587,12 @@ static void update_shadow (void)
                nsp->sp_lstchg = 0;
 
        if (!spw_update (nsp)) {
-               fprintf (stderr, _("Error updating the password entry.\n"));
+               fputs (_("Error updating the password entry.\n"), stderr);
                SYSLOG ((LOG_ERR, "error updating password entry"));
                fail_exit (E_FAILURE);
        }
        if (!spw_close ()) {
-               fprintf (stderr, _("Cannot commit password file changes.\n"));
+               fputs (_("Cannot commit password file changes.\n"), stderr);
                SYSLOG ((LOG_ERR, "can't rewrite password file"));
                fail_exit (E_FAILURE);
        }
@@ -934,7 +931,7 @@ int main (int argc, char **argv)
        }
 #endif                         /* USE_PAM */
        if (setuid (0)) {
-               fprintf (stderr, _("Cannot change ID to root.\n"));
+               fputs (_("Cannot change ID to root.\n"), stderr);
                SYSLOG ((LOG_ERR, "can't setuid(0)"));
                closelog ();
                exit (E_NOPERM);
@@ -951,9 +948,9 @@ int main (int argc, char **argv)
        closelog ();
        if (!qflg) {
                if (!eflg)
-                       printf (_("Password changed.\n"));
+                       puts (_("Password changed.\n"));
                else
-                       printf (_("Password set to expire.\n"));
+                       puts (_("Password set to expire.\n"));
        }
        exit (E_SUCCESS);
        /* NOT REACHED */
index ac5e483a748bfcd55db88f0536e1048ca563d6ea..849a39f579835982f70ae90f82e435b78374efd7 100644 (file)
--- a/src/su.c
+++ b/src/su.c
@@ -274,7 +274,7 @@ static void run_shell (const char *shellstr, char *args[], int doshell,
   */
 static void usage (void)
 {
-       fprintf (stderr, _("Usage: su [options] [LOGIN]\n"
+       fputs (_("Usage: su [options] [LOGIN]\n"
                           "\n"
                           "Options:\n"
                           "  -c, --command COMMAND         pass COMMAND to the invoked shell\n"
@@ -284,7 +284,7 @@ static void usage (void)
                           "  --preserve-environment        do not reset environment variables, and\n"
                           "                                keep the same shell\n"
                           "  -s, --shell SHELL             use SHELL instead of the default in passwd\n"
-                          "\n"));
+                          "\n"), stderr);
        exit (E_USAGE);
 }
 
@@ -868,7 +868,7 @@ int main (int argc, char **argv)
 #ifndef USE_PAM
                (void) execve (shellstr, &argv[-1], environ);
                err = errno;
-               (void) fprintf (stderr, _("No shell\n"));
+               (void) fputs (_("No shell\n"), stderr);
                SYSLOG ((LOG_WARN, "Cannot execute %s", shellstr));
                closelog ();
                exit (err == ENOENT ? E_CMD_NOTFOUND : E_CMD_NOEXEC);
index a9cab331e57da1ff63196898e0f428f8552a1b91..0a09f83be8e71738ca3dea32fe5b432017a4065d 100644 (file)
@@ -100,25 +100,23 @@ int check_su_auth (const char *actual_id, const char *wanted_id)
                        SYSLOG ((pwent.pw_uid ? LOG_NOTICE : LOG_WARN,
                                 "DENIED su from `%s' to `%s' (%s)\n",
                                 actual_id, wanted_id, SUAUTHFILE));
-                       fprintf (stderr,
-                                _("Access to su to that account DENIED.\n"));
+                       fputs (_("Access to su to that account DENIED.\n"),
+                              stderr);
                        fclose (authfile_fd);
                        return DENY;
                } else if (!strcmp (action, "NOPASS")) {
                        SYSLOG ((pwent.pw_uid ? LOG_INFO : LOG_NOTICE,
                                 "NO password asked for su from `%s' to `%s' (%s)\n",
                                 actual_id, wanted_id, SUAUTHFILE));
-                       fprintf (stderr,
-                                _("Password authentication bypassed.\n"));
+                       fputs (_("Password authentication bypassed.\n"),stderr);
                        fclose (authfile_fd);
                        return NOPWORD;
                } else if (!strcmp (action, "OWNPASS")) {
                        SYSLOG ((pwent.pw_uid ? LOG_INFO : LOG_NOTICE,
                                 "su from `%s' to `%s': asking for user's own password (%s)\n",
                                 actual_id, wanted_id, SUAUTHFILE));
-                       fprintf (stderr,
-                                _
-                                ("Please enter your OWN password as authentication.\n"));
+                       fputs (_("Please enter your OWN password as authentication.\n"),
+                              stderr);
                        fclose (authfile_fd);
                        return OWNPWORD;
                } else {
index 04f37e246c7fa582e66a4d581919e4299d9d5ac3..d79145cd5ac2d284e81350448d9bb39f5671612c 100644 (file)
@@ -611,7 +611,7 @@ static int get_groups (char *list)
  */
 static void usage (void)
 {
-       fprintf (stderr, _("Usage: useradd [options] LOGIN\n"
+       fputs (_("Usage: useradd [options] LOGIN\n"
                           "\n"
                           "Options:\n"
                           "  -b, --base-dir BASE_DIR       base directory for the new user account\n"
@@ -639,7 +639,7 @@ static void usage (void)
                           "                                account\n"
                           "  -s, --shell SHELL             the login shell for the new user account\n"
                           "  -u, --uid UID                 force use the UID for the new user account\n"
-                          "\n"));
+                          "\n"), stderr);
        exit (E_USAGE);
 }
 
@@ -1546,9 +1546,8 @@ static void create_mail (void)
 
                gr = getgrnam ("mail"); /* local, no need for xgetgrnam */
                if (!gr) {
-                       fprintf (stderr,
-                                _
-                                ("Group 'mail' not found. Creating the user mailbox file with 0600 mode.\n"));
+                       fputs (_("Group 'mail' not found. Creating the user mailbox file with 0600 mode.\n"),
+                              stderr);
                        gid = user_gid;
                        mode = 0600;
                } else {
index 759fec758cd22950c9a9e4fb20ae26c6636175bd..f8df2b0c104f831c6f2f20f12a4792f76c47b5ee 100644 (file)
@@ -99,14 +99,14 @@ static void remove_mailbox (void);
  */
 static void usage (void)
 {
-       fprintf (stderr, _("Usage: userdel [options] LOGIN\n"
+       fputs (_("Usage: userdel [options] LOGIN\n"
                           "\n"
                           "Options:\n"
                           "  -f, --force                   force removal of files,\n"
                           "                                even if not owned by user\n"
                           "  -h, --help                    display this help message and exit\n"
                           "  -r, --remove                  remove home directory and mail spool\n"
-                          "\n"));
+                          "\n"), stderr);
        exit (E_USAGE);
 }
 
index cc0a124303ad60c03529ae151517f73062e23ee7..6a63e7f7737d0fa5dfaed1a381d4c50b25a0b756 100644 (file)
@@ -276,7 +276,7 @@ static int get_groups (char *list)
  */
 static void usage (void)
 {
-       fprintf (stderr, _("Usage: usermod [options] LOGIN\n"
+       fputs (_("Usage: usermod [options] LOGIN\n"
                           "\n"
                           "Options:\n"
                           "  -c, --comment COMMENT         new value of the GECOS field\n"
@@ -299,7 +299,7 @@ static void usage (void)
                           "  -s, --shell SHELL             new login shell for the user account\n"
                           "  -u, --uid UID                 new UID for the user account\n"
                           "  -U, --unlock                  unlock the user account\n"
-                          "\n"));
+                          "\n"), stderr);
        exit (E_USAGE);
 }