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

Nicolas FRANÇOIS nekral-guest at alioth.debian.org
Fri Jul 8 19:56:18 UTC 2011


Author: nekral-guest
Date: 2011-07-08 19:56:18 +0000 (Fri, 08 Jul 2011)
New Revision: 3380

Modified:
   upstream/trunk/ChangeLog
   upstream/trunk/lib/fields.c
   upstream/trunk/src/vipw.c
Log:
	* lib/fields.c: Fixed typo from 2010-02-15. field insteadof cp
	ought to be checked.
	* src/vipw.c: Use Prog instead of progname. This is needed since
	Prog is used in the library.


Modified: upstream/trunk/ChangeLog
===================================================================
--- upstream/trunk/ChangeLog	2011-07-08 19:51:32 UTC (rev 3379)
+++ upstream/trunk/ChangeLog	2011-07-08 19:56:18 UTC (rev 3380)
@@ -1,5 +1,15 @@
 2011-07-08  Nicolas François  <nicolas.francois at centraliens.net>
 
+	* src/groupadd.c: Fix typo in comment.
+	* src/userdel.c: Fix typo from 2011-06-04. Report failure on the
+	mailfile instead of user_home.
+	* lib/fields.c: Fixed typo from 2010-02-15. field insteadof cp
+	ought to be checked.
+	* src/vipw.c: Use Prog instead of progname. This is needed since
+	Prog is used in the library.
+
+2011-07-08  Nicolas François  <nicolas.francois at centraliens.net>
+
 	* man/*.xml, man/config.xml.in: Add source and version
 	information. This reduce the amount of warnings during the
 	manpages generation.

Modified: upstream/trunk/lib/fields.c
===================================================================
--- upstream/trunk/lib/fields.c	2011-07-08 19:51:32 UTC (rev 3379)
+++ upstream/trunk/lib/fields.c	2011-07-08 19:56:18 UTC (rev 3380)
@@ -54,7 +54,7 @@
 	const char *cp;
 	int err = 0;
 
-	if (NULL == cp) {
+	if (NULL == field) {
 		return -1;
 	}
 

Modified: upstream/trunk/src/vipw.c
===================================================================
--- upstream/trunk/src/vipw.c	2011-07-08 19:51:32 UTC (rev 3379)
+++ upstream/trunk/src/vipw.c	2011-07-08 19:56:18 UTC (rev 3380)
@@ -61,7 +61,9 @@
 /*
  * Global variables
  */
-static const char *progname, *filename, *fileeditname;
+const char *Prog;
+
+static const char *filename, *fileeditname;
 static bool filelocked = false;
 static bool createedit = false;
 static int (*unlock) (void);
@@ -158,26 +160,26 @@
 
 	if (createedit) {
 		if (unlink (fileeditname) != 0) {
-			fprintf (stderr, _("%s: failed to remove %s\n"), progname, fileeditname);
+			fprintf (stderr, _("%s: failed to remove %s\n"), Prog, fileeditname);
 			/* continue */
 		}
 	}
 	if (filelocked) {
 		if ((*unlock) () == 0) {
-			fprintf (stderr, _("%s: failed to unlock %s\n"), progname, fileeditname);
+			fprintf (stderr, _("%s: failed to unlock %s\n"), Prog, fileeditname);
 			SYSLOG ((LOG_ERR, "failed to unlock %s", fileeditname));
 			/* continue */
 		}
 	}
 	if (NULL != msg) {
-		fprintf (stderr, "%s: %s", progname, msg);
+		fprintf (stderr, "%s: %s", Prog, msg);
 	}
 	if (0 != syserr) {
 		fprintf (stderr, ": %s", strerror (err));
 	}
 	(void) fputs ("\n", stderr);
 	if (!quiet) {
-		fprintf (stdout, _("%s: %s is unchanged\n"), progname,
+		fprintf (stdout, _("%s: %s is unchanged\n"), Prog,
 			 filename);
 	}
 	exit (ret);
@@ -297,7 +299,7 @@
 		snprintf (buf, strlen (editor) + strlen (fileedit) + 2,
 			  "%s %s", editor, fileedit);
 		if (system (buf) != 0) {
-			fprintf (stderr, "%s: %s: %s\n", progname, editor,
+			fprintf (stderr, "%s: %s: %s\n", Prog, editor,
 			         strerror (errno));
 			exit (1);
 		} else {
@@ -381,7 +383,7 @@
 	if (rename (to_rename, file) == -1) {
 		fprintf (stderr,
 		         _("%s: can't restore %s: %s (your changes are in %s)\n"),
-		         progname, file, strerror (errno), to_rename);
+		         Prog, file, strerror (errno), to_rename);
 #ifdef WITH_TCB
 		if (tcb_mode) {
 			free (to_rename);
@@ -400,7 +402,7 @@
 #endif				/* WITH_TCB */
 
 	if ((*file_unlock) () == 0) {
-		fprintf (stderr, _("%s: failed to unlock %s\n"), progname, fileeditname);
+		fprintf (stderr, _("%s: failed to unlock %s\n"), Prog, fileeditname);
 		SYSLOG ((LOG_ERR, "failed to unlock %s", fileeditname));
 		/* continue */
 	}
@@ -417,8 +419,8 @@
 	(void) bindtextdomain (PACKAGE, LOCALEDIR);
 	(void) textdomain (PACKAGE);
 
-	progname = ((a = strrchr (*argv, '/')) ? a + 1 : *argv);
-	do_vipw = (strcmp (progname, "vigr") != 0);
+	Prog = ((a = strrchr (*argv, '/')) ? a + 1 : *argv);
+	do_vipw = (strcmp (Prog, "vigr") != 0);
 
 	OPENLOG (do_vipw ? "vipw" : "vigr");
 
@@ -479,7 +481,7 @@
 				if (shadowtcb_set_user (user) == SHADOWTCB_FAILURE) {
 					fprintf (stderr,
 					         _("%s: failed to find tcb directory for %s\n"),
-					         progname, user);
+					         Prog, user);
 					return E_SHADOW_NOTFOUND;
 				}
 				tcb_mode = true;




More information about the Pkg-shadow-commits mailing list