]> granicus.if.org Git - shadow/commitdiff
* src/passwd.c: do_update_age is only used ifndef USE_PAM. Make it
authornekral-guest <nekral-guest@5a98b0ae-9ef6-0310-add3-de5d479b70d7>
Sun, 5 Apr 2009 22:04:31 +0000 (22:04 +0000)
committernekral-guest <nekral-guest@5a98b0ae-9ef6-0310-add3-de5d479b70d7>
Sun, 5 Apr 2009 22:04:31 +0000 (22:04 +0000)
more explicit.

ChangeLog
src/passwd.c

index e3536db2d097f490c31554e8e8d101e68c41cb87..db4c63c1b640f5cb9fb36da9f97820eba39458b8 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2009-04-05  Nicolas François  <nicolas.francois@centraliens.net>
+
+       * src/passwd.c: do_update_age is only used ifndef USE_PAM. Make it
+       more explicit.
+
 2009-04-05  Nicolas François  <nicolas.francois@centraliens.net>
 
        * src/useradd.c: Set errno to 0 before calling strtol.
index 47693691efbdfedbc649b084c6649d2fd3c3723f..1ec13a77c88ec6fc07d826e1204dd6cb0d821b26 100644 (file)
@@ -99,7 +99,9 @@ static long age_max = 0;      /* Maximum days until change     */
 static long warn = 0;          /* Warning days before change   */
 static long inact = 0;         /* Days without change before locked */
 
+#ifndef USE_PAM
 static bool do_update_age = false;
+#endif
 
 static bool pw_locked = false;
 static bool spw_locked = false;
@@ -634,6 +636,7 @@ static void update_shadow (void)
        if (iflg) {
                nsp->sp_inact = (inact * DAY) / SCALE;
        }
+#ifndef USE_PAM
        if (do_update_age) {
                nsp->sp_lstchg = (long) time ((time_t *) 0) / SCALE;
                if (0 == nsp->sp_lstchg) {
@@ -642,6 +645,7 @@ static void update_shadow (void)
                        nsp->sp_lstchg = -1;
                }
        }
+#endif
 
        /*
         * Force change on next login, like SunOS 4.x passwd -e or Solaris