if (aflg) {
/* Entries for non existing users are also reset.
*/
- uid_t uid = 0;
+ uid_t uid = 0;
- /* Make sure we stay in the umin-umax range if specified */
- if (has_umin) {
- uid = (uid_t)umin;
- }
+ /* Make sure we stay in the umin-umax range if specified */
+ if (has_umin) {
+ uid = (uid_t)umin;
+ }
- while (uid <= uidmax) {
- if (reset_one (uid)) {
- errors = true;
+ while (uid <= uidmax) {
+ if (reset_one (uid)) {
+ errors = true;
+ }
+ uid++;
}
- uid++;
- }
} else {
/* Only reset records for existing users.
*/
* entries will be created.
*/
if (aflg) {
- /* Entries for non existing user are also taken into
- * account (in order to define policy for future users).
- */
- uid_t uid = 0;
- /* The default umax value is based on the size of the
- * faillog database.
- */
- uid_t uidmax = statbuf.st_size / sizeof (struct faillog);
- if (uidmax > 1) {
- uidmax--;
- }
+ /* Entries for non existing user are also taken into
+ * account (in order to define policy for future users).
+ */
+ uid_t uid = 0;
+ /* The default umax value is based on the size of the
+ * faillog database.
+ */
+ uid_t uidmax = statbuf.st_size / sizeof (struct faillog);
+ if (uidmax > 1) {
+ uidmax--;
+ }
- /* Make sure we stay in the umin-umax range if specified */
- if (has_umin) {
- uid = (uid_t)umin;
- }
- if (has_umax) {
- uidmax = (uid_t)umax;
- }
+ /* Make sure we stay in the umin-umax range if specified */
+ if (has_umin) {
+ uid = (uid_t)umin;
+ }
+ if (has_umax) {
+ uidmax = (uid_t)umax;
+ }
- while (uid <= uidmax) {
- if (setmax_one (uid, max)) {
- errors = true;
+ while (uid <= uidmax) {
+ if (setmax_one (uid, max)) {
+ errors = true;
+ }
+ uid++;
}
- uid++;
- }
} else {
/* Only change records for existing users.
*/
* entries will be created.
*/
if (aflg) {
- /* Entries for non existing user are also taken into
- * account (in order to define policy for future users).
- */
- uid_t uid = 0;
- /* The default umax value is based on the size of the
- * faillog database.
- */
- uid_t uidmax = statbuf.st_size / sizeof (struct faillog);
- if (uidmax > 1) {
- uidmax--;
- }
+ /* Entries for non existing user are also taken into
+ * account (in order to define policy for future users).
+ */
+ uid_t uid = 0;
+ /* The default umax value is based on the size of the
+ * faillog database.
+ */
+ uid_t uidmax = statbuf.st_size / sizeof (struct faillog);
+ if (uidmax > 1) {
+ uidmax--;
+ }
- /* Make sure we stay in the umin-umax range if specified */
- if (has_umin) {
- uid = (uid_t)umin;
- }
- if (has_umax) {
- uidmax = (uid_t)umax;
- }
+ /* Make sure we stay in the umin-umax range if specified */
+ if (has_umin) {
+ uid = (uid_t)umin;
+ }
+ if (has_umax) {
+ uidmax = (uid_t)umax;
+ }
- while (uid <= uidmax) {
- if (set_locktime_one (uid, locktime)) {
- errors = true;
+ while (uid <= uidmax) {
+ if (set_locktime_one (uid, locktime)) {
+ errors = true;
+ }
+ uid++;
}
- uid++;
- }
} else {
/* Only change records for existing users.
*/