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

nekral-guest at alioth.debian.org nekral-guest at alioth.debian.org
Sat Aug 30 18:28:24 UTC 2008


Author: nekral-guest
Date: 2008-08-30 18:28:24 +0000 (Sat, 30 Aug 2008)
New Revision: 2290

Modified:
   upstream/trunk/ChangeLog
   upstream/trunk/src/chfn.c
   upstream/trunk/src/chsh.c
   upstream/trunk/src/gpasswd.c
   upstream/trunk/src/groupadd.c
   upstream/trunk/src/groupmems.c
   upstream/trunk/src/newgrp.c
   upstream/trunk/src/newusers.c
Log:
	* src/chfn.c: Merge some translated messages.
	* src/groupmems.c, src/groupadd.c, src/gpasswd.c, src/chsh.c,
	src/chfn.c: Harmonize *_update() failure messages.
	* src/groupmems.c: Harmonize gr_close() failure messages.
	* src/newgrp.c: Harmonize "unknown GID" messages.
	* src/newusers.c: Move the pwd declaration to a inner block scope.

Modified: upstream/trunk/ChangeLog
===================================================================
--- upstream/trunk/ChangeLog	2008-08-30 18:27:59 UTC (rev 2289)
+++ upstream/trunk/ChangeLog	2008-08-30 18:28:24 UTC (rev 2290)
@@ -1,5 +1,14 @@
-2008-08-25  Nicolas François  <nicolas.francois at centraliens.net>
+2008-08-26  Nicolas François  <nicolas.francois at centraliens.net>
 
+	* src/chfn.c: Merge some translated messages.
+	* src/groupmems.c, src/groupadd.c, src/gpasswd.c, src/chsh.c,
+	src/chfn.c: Harmonize *_update() failure messages.
+	* src/groupmems.c: Harmonize gr_close() failure messages.
+	* src/newgrp.c: Harmonize "unknown GID" messages.
+	* src/newusers.c: Move the pwd declaration to a inner block scope.
+
+2008-08-26  Nicolas François  <nicolas.francois at centraliens.net>
+
 	* src/useradd.c: Harmonize some error messages.
 	* src/userdel.c: Add log to syslog when the mail file could not be
 	removed.

Modified: upstream/trunk/src/chfn.c
===================================================================
--- upstream/trunk/src/chfn.c	2008-08-30 18:27:59 UTC (rev 2289)
+++ upstream/trunk/src/chfn.c	2008-08-30 18:28:24 UTC (rev 2290)
@@ -190,25 +190,25 @@
 	if (may_change_field ('f')) {
 		change_field (fullnm, sizeof fullnm, _("Full Name"));
 	} else {
-		printf (_("\tFull Name: %s\n"), fullnm);
+		printf (_("\t%s: %s\n"), _("Full Name"), fullnm);
 	}
 
 	if (may_change_field ('r')) {
 		change_field (roomno, sizeof roomno, _("Room Number"));
 	} else {
-		printf (_("\tRoom Number: %s\n"), roomno);
+		printf (_("\t%s: %s\n"), _("Room Number"), fullnm);
 	}
 
 	if (may_change_field ('w')) {
 		change_field (workph, sizeof workph, _("Work Phone"));
 	} else {
-		printf (_("\tWork Phone: %s\n"), workph);
+		printf (_("\t%s: %s\n"), _("Work Phone"), fullnm);
 	}
 
 	if (may_change_field ('h')) {
 		change_field (homeph, sizeof homeph, _("Home Phone"));
 	} else {
-		printf (_("\tHome Phone: %s\n"), homeph);
+		printf (_("\t%s: %s\n"), _("Home Phone"), fullnm);
 	}
 
 	if (amroot) {
@@ -476,8 +476,8 @@
 	 */
 	if (pw_update (&pwent) == 0) {
 		fprintf (stderr,
-		         _("%s: failed to prepare the new %s entry\n"),
-		         Prog, pw_dbname ());
+		         _("%s: failed to prepare the new %s entry '%s'\n"),
+		         Prog, pw_dbname (), pwent.pw_name);
 		fail_exit (E_NOPERM);
 	}
 

Modified: upstream/trunk/src/chsh.c
===================================================================
--- upstream/trunk/src/chsh.c	2008-08-30 18:27:59 UTC (rev 2289)
+++ upstream/trunk/src/chsh.c	2008-08-30 18:28:24 UTC (rev 2290)
@@ -401,7 +401,8 @@
 	 */
 	if (pw_update (&pwent) == 0) {
 		fprintf (stderr,
-		         _("%s: failed to prepare the new %s entry\n"), Prog, pw_dbname ());
+		         _("%s: failed to prepare the new %s entry '%s'\n"),
+		         Prog, pw_dbname (), pwent.pw_name);
 		fail_exit (1);
 	}
 

Modified: upstream/trunk/src/gpasswd.c
===================================================================
--- upstream/trunk/src/gpasswd.c	2008-08-30 18:27:59 UTC (rev 2289)
+++ upstream/trunk/src/gpasswd.c	2008-08-30 18:28:24 UTC (rev 2290)
@@ -577,8 +577,9 @@
 {
 	if (gr_update (gr) == 0) {
 		fprintf (stderr,
-		         _("%s: failed to prepare the new %s entry\n"), Prog, gr_dbname ());
-		SYSLOG ((LOG_WARN, "failed to prepare the new %s entry", gr_dbname ()));
+		         _("%s: failed to prepare the new %s entry '%s'\n"),
+		         Prog, gr_dbname (), gr->gr_name);
+		SYSLOG ((LOG_WARN, "failed to prepare the new %s entry '%s'", gr_dbname (), gr->gr_name));
 #ifdef WITH_AUDIT
 		audit_logger (AUDIT_USER_CHAUTHTOK, Prog,
 		              "updating /etc/group",
@@ -589,8 +590,9 @@
 #ifdef SHADOWGRP
 	if (is_shadowgrp && (sgr_update (sg) == 0)) {
 		fprintf (stderr,
-		         _("%s: failed to prepare the new %s entry\n"), Prog, sgr_dbname ());
-		SYSLOG ((LOG_WARN, "failed to prepare the new %s entry", sgr_dbname ()));
+		         _("%s: failed to prepare the new %s entry '%s'\n"),
+		         Prog, sgr_dbname (), sg->sg_name);
+		SYSLOG ((LOG_WARN, "failed to prepare the new %s entry '%s'", sgr_dbname (), sg->sg_name));
 #ifdef WITH_AUDIT
 		audit_logger (AUDIT_USER_CHAUTHTOK, Prog,
 		              "updating /etc/gshadow",

Modified: upstream/trunk/src/groupadd.c
===================================================================
--- upstream/trunk/src/groupadd.c	2008-08-30 18:27:59 UTC (rev 2289)
+++ upstream/trunk/src/groupadd.c	2008-08-30 18:28:24 UTC (rev 2290)
@@ -199,7 +199,8 @@
 	 */
 	if (gr_update (&grp) == 0) {
 		fprintf (stderr,
-		         _("%s: failed to prepare the new %s entry\n"), Prog, gr_dbname ());
+		         _("%s: failed to prepare the new %s entry '%s'\n"),
+		         Prog, gr_dbname (), grp.gr_name);
 		fail_exit (E_GRP_UPDATE);
 	}
 #ifdef	SHADOWGRP
@@ -208,7 +209,8 @@
 	 */
 	if (is_shadow_grp && (sgr_update (&sgrp) == 0)) {
 		fprintf (stderr,
-		         _("%s: failed to prepare the new %s entry\n"), Prog, sgr_dbname ());
+		         _("%s: failed to prepare the new %s entry '%s'\n"),
+		         Prog, sgr_dbname (), sgrp.sg_name);
 		fail_exit (E_GRP_UPDATE);
 	}
 #endif				/* SHADOWGRP */

Modified: upstream/trunk/src/groupmems.c
===================================================================
--- upstream/trunk/src/groupmems.c	2008-08-30 18:27:59 UTC (rev 2289)
+++ upstream/trunk/src/groupmems.c	2008-08-30 18:28:24 UTC (rev 2290)
@@ -286,7 +286,8 @@
 		grp->gr_mem = add_list (grp->gr_mem, adduser);
 		if (gr_update (grp) == 0) {
 			fprintf (stderr,
-			         _("%s: failed to prepare the new %s entry\n"), Prog, gr_dbname ());
+			         _("%s: failed to prepare the new %s entry '%s'\n"),
+			         Prog, gr_dbname (), grp->gr_name);
 			fail_exit (13);
 		}
 	} else if (NULL != deluser) {
@@ -299,20 +300,22 @@
 		grp->gr_mem = del_list (grp->gr_mem, deluser);
 		if (gr_update (grp) == 0) {
 			fprintf (stderr,
-			         _("%s: failed to prepare the new %s entry\n"), Prog, gr_dbname ());
+			         _("%s: failed to prepare the new %s entry '%s'\n"),
+			         Prog, gr_dbname (), grp->gr_name);
 			fail_exit (13);
 		}
 	} else if (purge) {
 		grp->gr_mem[0] = NULL;
 		if (gr_update (grp) == 0) {
 			fprintf (stderr,
-			         _("%s: failed to prepare the new %s entry\n"), Prog, gr_dbname ());
+			         _("%s: failed to prepare the new %s entry '%s'\n"),
+			         Prog, gr_dbname (), grp->gr_name);
 			fail_exit (13);
 		}
 	}
 
 	if (gr_close () == 0) {
-		fprintf (stderr, _("%s: failure while writing %s\n"), Prog, gr_dbname ());
+		fprintf (stderr, _("%s: failure while writing changes to %s\n"), Prog, gr_dbname ());
 		SYSLOG ((LOG_ERR, "failure while writing %s", gr_dbname ()));
 		fail_exit (EXIT_GROUP_FILE);
 	}

Modified: upstream/trunk/src/newgrp.c
===================================================================
--- upstream/trunk/src/newgrp.c	2008-08-30 18:27:59 UTC (rev 2289)
+++ upstream/trunk/src/newgrp.c	2008-08-30 18:28:24 UTC (rev 2290)
@@ -507,10 +507,11 @@
 			 */
 			grp = xgetgrgid (pwd->pw_gid);
 			if (NULL == grp) {
-				fprintf (stderr, _("unknown GID: %lu\n"),
-					 (unsigned long) pwd->pw_gid);
-				SYSLOG ((LOG_CRIT, "unknown GID: %lu",
-					 (unsigned long) pwd->pw_gid));
+				fprintf (stderr,
+				         _("%s: GID '%lu' does not exist\n"),
+				         Prog, (unsigned long) pwd->pw_gid);
+				SYSLOG ((LOG_CRIT, "GID '%lu' does not exist",
+				        (unsigned long) pwd->pw_gid));
 				goto failure;
 			} else {
 				group = grp->gr_name;

Modified: upstream/trunk/src/newusers.c
===================================================================
--- upstream/trunk/src/newusers.c	2008-08-30 18:27:59 UTC (rev 2289)
+++ upstream/trunk/src/newusers.c	2008-08-30 18:28:24 UTC (rev 2290)
@@ -284,7 +284,6 @@
 }
 
 static int get_uid (const char *uid, uid_t *nuid) {
-	const struct passwd *pwd = NULL;
 
 	/*
 	 * The first guess for the UID is either the numerical UID that the
@@ -302,6 +301,7 @@
 		*nuid = (uid_t) i;
 	} else {
 		if ('\0' != uid[0]) {
+			const struct passwd *pwd;
 			/* local, no need for xgetpwnam */
 			pwd = getpwnam (uid);
 			if (NULL == pwd) {




More information about the Pkg-shadow-commits mailing list