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

nekral-guest at alioth.debian.org nekral-guest at alioth.debian.org
Fri Aug 22 02:34:04 UTC 2008


Author: nekral-guest
Date: 2008-08-22 02:34:04 +0000 (Fri, 22 Aug 2008)
New Revision: 2286

Modified:
   upstream/trunk/ChangeLog
   upstream/trunk/src/usermod.c
Log:
	* src/usermod.c: Log errors while *_close to syslog.
	* src/usermod.c: Added missing }

Modified: upstream/trunk/ChangeLog
===================================================================
--- upstream/trunk/ChangeLog	2008-08-22 02:33:08 UTC (rev 2285)
+++ upstream/trunk/ChangeLog	2008-08-22 02:34:04 UTC (rev 2286)
@@ -1,5 +1,9 @@
 2008-08-21  Nicolas François  <nicolas.francois at centraliens.net>
 
+	* src/usermod.c: Log errors while *_close to syslog.
+
+2008-08-21  Nicolas François  <nicolas.francois at centraliens.net>
+
 	* src/grpconv.c: Use Basename for the definition of Prog. Prog
 	needs a file visibility.
 	* src/grpunconv.c: Likewise.

Modified: upstream/trunk/src/usermod.c
===================================================================
--- upstream/trunk/src/usermod.c	2008-08-22 02:33:08 UTC (rev 2285)
+++ upstream/trunk/src/usermod.c	2008-08-22 02:34:04 UTC (rev 2286)
@@ -1120,12 +1120,16 @@
 {
 	if (pw_close () == 0) {
 		fprintf (stderr,
-		         _("%s: failure while writing changes to %s\n"), Prog, pw_dbname ());
+		         _("%s: failure while writing changes to %s\n"),
+		         Prog, pw_dbname ());
+		SYSLOG ((LOG_ERR, "failure while writing changes to %s", pw_dbname ()));
 		fail_exit (E_PW_UPDATE);
 	}
 	if (is_shadow_pwd && (spw_close () == 0)) {
 		fprintf (stderr,
-		         _("%s: failure while writing changes to %s\n"), Prog, spw_dbname ());
+		         _("%s: failure while writing changes to %s\n"),
+		         Prog, spw_dbname ());
+		SYSLOG ((LOG_ERR, "failure while writing changes to %s", spw_dbname ()));
 		fail_exit (E_PW_UPDATE);
 	}
 
@@ -1134,15 +1138,18 @@
 			fprintf (stderr,
 			         _("%s: failure while writing changes to %s\n"),
 			         Prog, gr_dbname ());
+			SYSLOG ((LOG_ERR, "failure while writing changes to %s", gr_dbname ()));
 			fail_exit (E_GRP_UPDATE);
 		}
 #ifdef SHADOWGRP
 		if (is_shadow_grp) {
 			if (sgr_close () == 0) {
-			fprintf (stderr,
-			         _("%s: failure while writing changes to %s\n"),
-			         Prog, sgr_dbname ());
-			fail_exit (E_GRP_UPDATE);
+				fprintf (stderr,
+				         _("%s: failure while writing changes to %s\n"),
+				         Prog, sgr_dbname ());
+				SYSLOG ((LOG_ERR, "failure while writing changes to %s", sgr_dbname ()));
+				fail_exit (E_GRP_UPDATE);
+			}
 			if (sgr_unlock () == 0) {
 				fprintf (stderr, _("%s: failed to unlock %s\n"), Prog, sgr_dbname ());
 				SYSLOG ((LOG_ERR, "failed to unlock %s", sgr_dbname ()));




More information about the Pkg-shadow-commits mailing list