Blob Blame History Raw
diff -up shadow-4.1.0/src/faillog.c.fasterReset shadow-4.1.0/src/faillog.c
--- shadow-4.1.0/src/faillog.c.fasterReset	2008-03-04 14:08:55.000000000 +0100
+++ shadow-4.1.0/src/faillog.c	2008-03-04 14:11:13.000000000 +0100
@@ -164,8 +164,13 @@ static void reset (void)
 
 	if (uflg)
 		reset_one (user);
-	else
-		for (uid = 0; reset_one (uid); uid++);
+	else {
+		struct passwd *pwent;
+
+		setpwent ();
+		while ( pwent = getpwent () )
+				reset_one (pwent->pw_uid);
+	}
 }
 
 static void print (void)