shadow-utils/shadow-4.1.0-fasterReset.patch
2008-03-07 15:34:03 +00:00

20 lines
503 B
Diff

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)