[Pkg-shadow-commits] r2241 - upstream/trunk/src

nekral-guest at alioth.debian.org nekral-guest at alioth.debian.org
Wed Aug 6 15:55:57 UTC 2008


Author: nekral-guest
Date: 2008-08-06 15:55:57 +0000 (Wed, 06 Aug 2008)
New Revision: 2241

Modified:
   upstream/trunk/src/gpasswd.c
Log:
 * Merge two is_shadowgrp blocks.
 * Indicate that we continue when *_unlock fail

Modified: upstream/trunk/src/gpasswd.c
===================================================================
--- upstream/trunk/src/gpasswd.c	2008-08-06 15:55:16 UTC (rev 2240)
+++ upstream/trunk/src/gpasswd.c	2008-08-06 15:55:57 UTC (rev 2241)
@@ -438,17 +438,17 @@
 		fail_exit (1);
 	}
 #ifdef SHADOWGRP
-	if (is_shadowgrp && (sgr_close () == 0)) {
-		fprintf (stderr, _("%s: cannot rewrite the shadow group file\n"), Prog);
-		SYSLOG ((LOG_WARN, "cannot rewrite the shadow group file"));
+	if (is_shadowgrp) {
+		if (sgr_close () == 0) {
+			fprintf (stderr, _("%s: cannot rewrite the shadow group file\n"), Prog);
+			SYSLOG ((LOG_WARN, "cannot rewrite the shadow group file"));
 #ifdef WITH_AUDIT
-		audit_logger (AUDIT_USER_CHAUTHTOK, Prog,
-		              "rewriting /etc/gshadow",
-		              group, AUDIT_NO_ID, 0);
+			audit_logger (AUDIT_USER_CHAUTHTOK, Prog,
+			              "rewriting /etc/gshadow",
+			              group, AUDIT_NO_ID, 0);
 #endif
-		fail_exit (1);
-	}
-	if (is_shadowgrp) {
+			fail_exit (1);
+		}
 		if (sgr_unlock () == 0) {
 			fprintf (stderr, _("%s: cannot unlock the shadow group file\n"), Prog);
 			SYSLOG ((LOG_WARN, "cannot unlock the shadow group file"));
@@ -457,6 +457,7 @@
 			              "unlocking gshadow file",
 			              group, AUDIT_NO_ID, 0);
 #endif
+			/* continue */
 		}
 		gshadow_locked = false;
 	}
@@ -469,6 +470,7 @@
 		              "unlocking group file",
 		              group, AUDIT_NO_ID, 0);
 #endif
+		/* continue */
 	}
 	group_locked = false;
 }




More information about the Pkg-shadow-commits mailing list