[Pkg-shadow-commits] r1742 - in upstream/trunk: . src

nekral-guest at alioth.debian.org nekral-guest at alioth.debian.org
Thu Jan 24 20:42:12 UTC 2008


Author: nekral-guest
Date: 2008-01-24 20:42:12 +0000 (Thu, 24 Jan 2008)
New Revision: 1742

Modified:
   upstream/trunk/ChangeLog
   upstream/trunk/src/expiry.c
   upstream/trunk/src/faillog.c
   upstream/trunk/src/groupadd.c
   upstream/trunk/src/groupdel.c
   upstream/trunk/src/groupmems.c
   upstream/trunk/src/groupmod.c
   upstream/trunk/src/id.c
   upstream/trunk/src/lastlog.c
   upstream/trunk/src/login.c
   upstream/trunk/src/newgrp.c
   upstream/trunk/src/passwd.c
   upstream/trunk/src/su.c
   upstream/trunk/src/suauth.c
   upstream/trunk/src/useradd.c
   upstream/trunk/src/userdel.c
   upstream/trunk/src/usermod.c
Log:
Replace printf by puts for fixed strings. This would avoid issues caused
by formats introduced in translated strings.


Modified: upstream/trunk/ChangeLog
===================================================================
--- upstream/trunk/ChangeLog	2008-01-24 19:50:09 UTC (rev 1741)
+++ upstream/trunk/ChangeLog	2008-01-24 20:42:12 UTC (rev 1742)
@@ -1,7 +1,11 @@
 2008-01-24  Nicolas François  <nicolas.francois at 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.
 

Modified: upstream/trunk/src/expiry.c
===================================================================
--- upstream/trunk/src/expiry.c	2008-01-24 19:50:09 UTC (rev 1741)
+++ upstream/trunk/src/expiry.c	2008-01-24 20:42:12 UTC (rev 1742)
@@ -54,7 +54,7 @@
  */
 static void usage (void)
 {
-	fprintf (stderr, _("Usage: expiry {-f|-c}\n"));
+	fputs (_("Usage: expiry {-f|-c}\n"), stderr);
 	exit (10);
 }
 

Modified: upstream/trunk/src/faillog.c
===================================================================
--- upstream/trunk/src/faillog.c	2008-01-24 19:50:09 UTC (rev 1741)
+++ upstream/trunk/src/faillog.c	2008-01-24 20:42:12 UTC (rev 1742)
@@ -60,7 +60,7 @@
 
 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 @@
 			   "  -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 @@
 #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 */

Modified: upstream/trunk/src/groupadd.c
===================================================================
--- upstream/trunk/src/groupadd.c	2008-01-24 19:50:09 UTC (rev 1741)
+++ upstream/trunk/src/groupadd.c	2008-01-24 20:42:12 UTC (rev 1742)
@@ -105,7 +105,7 @@
  */
 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 @@
 	                   "  -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);
 }
 

Modified: upstream/trunk/src/groupdel.c
===================================================================
--- upstream/trunk/src/groupdel.c	2008-01-24 19:50:09 UTC (rev 1741)
+++ upstream/trunk/src/groupdel.c	2008-01-24 20:42:12 UTC (rev 1742)
@@ -80,7 +80,7 @@
  */
 static void usage (void)
 {
-	fprintf (stderr, _("Usage: groupdel group\n"));
+	fputs (_("Usage: groupdel group\n"), stderr);
 	exit (E_USAGE);
 }
 

Modified: upstream/trunk/src/groupmems.c
===================================================================
--- upstream/trunk/src/groupmems.c	2008-01-24 19:50:09 UTC (rev 1741)
+++ upstream/trunk/src/groupmems.c	2008-01-24 20:42:12 UTC (rev 1742)
@@ -99,7 +99,7 @@
 
 	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 @@
 	}
 
 	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 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 @@
 	}
 
 	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 @@
 	}
 
 	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 @@
 	}
 
 	if (!gr_close ()) {
-		fprintf (stderr, _("Cannot close group file\n"));
+		fputs (_("Cannot close group file\n"), stderr);
 		exit (EXIT_GROUP_FILE);
 	}
 

Modified: upstream/trunk/src/groupmod.c
===================================================================
--- upstream/trunk/src/groupmod.c	2008-01-24 19:50:09 UTC (rev 1741)
+++ upstream/trunk/src/groupmod.c	2008-01-24 20:42:12 UTC (rev 1742)
@@ -100,7 +100,7 @@
 
 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 @@
 			   "  -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);
 }
 

Modified: upstream/trunk/src/id.c
===================================================================
--- upstream/trunk/src/id.c	2008-01-24 19:50:09 UTC (rev 1741)
+++ upstream/trunk/src/id.c	2008-01-24 20:42:12 UTC (rev 1742)
@@ -50,9 +50,9 @@
 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 @@
 		 * 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 (',');

Modified: upstream/trunk/src/lastlog.c
===================================================================
--- upstream/trunk/src/lastlog.c	2008-01-24 19:50:09 UTC (rev 1741)
+++ upstream/trunk/src/lastlog.c	2008-01-24 20:42:12 UTC (rev 1742)
@@ -68,14 +68,14 @@
 
 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 @@
 
 	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++;
 	}

Modified: upstream/trunk/src/login.c
===================================================================
--- upstream/trunk/src/login.c	2008-01-24 19:50:09 UTC (rev 1741)
+++ upstream/trunk/src/login.c	2008-01-24 20:42:12 UTC (rev 1742)
@@ -189,7 +189,7 @@
  */
 static void bad_time_notify (void)
 {
-	printf (_("Invalid login time\n"));
+	puts (_("Invalid login time\n"));
 	fflush (stdout);
 }
 
@@ -223,7 +223,7 @@
 			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 @@
 			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 @@
 			    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);

Modified: upstream/trunk/src/newgrp.c
===================================================================
--- upstream/trunk/src/newgrp.c	2008-01-24 19:50:09 UTC (rev 1741)
+++ upstream/trunk/src/newgrp.c	2008-01-24 20:42:12 UTC (rev 1742)
@@ -66,9 +66,9 @@
 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 @@
 	}
 	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)) {

Modified: upstream/trunk/src/passwd.c
===================================================================
--- upstream/trunk/src/passwd.c	2008-01-24 19:50:09 UTC (rev 1741)
+++ upstream/trunk/src/passwd.c	2008-01-24 20:42:12 UTC (rev 1742)
@@ -143,7 +143,7 @@
  */
 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 @@
 			   "  -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 @@
 		strzero (cp);
 
 		if (!amroot && (!obscure (orig, pass, pw) || reuse (pass, pw))) {
-			printf (_("Try again.\n"));
+			puts (_("Try again.\n"));
 			continue;
 		}
 
@@ -293,8 +293,7 @@
 		 */
 		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 @@
 			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 @@
 	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 @@
 		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 @@
 	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 @@
 		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 @@
 	}
 #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 @@
 	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 */

Modified: upstream/trunk/src/su.c
===================================================================
--- upstream/trunk/src/su.c	2008-01-24 19:50:09 UTC (rev 1741)
+++ upstream/trunk/src/su.c	2008-01-24 20:42:12 UTC (rev 1742)
@@ -274,7 +274,7 @@
   */
 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 @@
 			   "  --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 @@
 #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);

Modified: upstream/trunk/src/suauth.c
===================================================================
--- upstream/trunk/src/suauth.c	2008-01-24 19:50:09 UTC (rev 1741)
+++ upstream/trunk/src/suauth.c	2008-01-24 20:42:12 UTC (rev 1742)
@@ -100,25 +100,23 @@
 			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 {

Modified: upstream/trunk/src/useradd.c
===================================================================
--- upstream/trunk/src/useradd.c	2008-01-24 19:50:09 UTC (rev 1741)
+++ upstream/trunk/src/useradd.c	2008-01-24 20:42:12 UTC (rev 1742)
@@ -611,7 +611,7 @@
  */
 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 @@
 			   "                                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 @@
 
 		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 {

Modified: upstream/trunk/src/userdel.c
===================================================================
--- upstream/trunk/src/userdel.c	2008-01-24 19:50:09 UTC (rev 1741)
+++ upstream/trunk/src/userdel.c	2008-01-24 20:42:12 UTC (rev 1742)
@@ -99,14 +99,14 @@
  */
 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);
 }
 

Modified: upstream/trunk/src/usermod.c
===================================================================
--- upstream/trunk/src/usermod.c	2008-01-24 19:50:09 UTC (rev 1741)
+++ upstream/trunk/src/usermod.c	2008-01-24 20:42:12 UTC (rev 1742)
@@ -276,7 +276,7 @@
  */
 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 @@
 			   "  -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);
 }
 




More information about the Pkg-shadow-commits mailing list