add faster reset patch
This commit is contained in:
parent
b4dd99d31b
commit
34e80945bb
19
shadow-4.1.0-fasterReset.patch
Normal file
19
shadow-4.1.0-fasterReset.patch
Normal file
@ -0,0 +1,19 @@
|
||||
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)
|
Loading…
Reference in New Issue
Block a user