[Pkg-shadow-commits] r2586 - in upstream/trunk: . src
Nicolas FRANCOIS
nekral-guest at alioth.debian.org
Sun Apr 5 21:23:17 UTC 2009
Author: nekral-guest
Date: 2009-04-05 21:23:17 +0000 (Sun, 05 Apr 2009)
New Revision: 2586
Modified:
upstream/trunk/ChangeLog
upstream/trunk/src/chage.c
Log:
* src/chage.c: When no shadow entry exist, thedefault sp_lstchg
value should be -1 (no aging) rather than 0 (password must be
changed).
* src/chage.c: For password expiration and inactivity, indicate
that the password must be changed when sp_lstchg is null rather
than indicating that expiration and inactivity are not enabled.
Modified: upstream/trunk/ChangeLog
===================================================================
--- upstream/trunk/ChangeLog 2009-04-05 21:23:06 UTC (rev 2585)
+++ upstream/trunk/ChangeLog 2009-04-05 21:23:17 UTC (rev 2586)
@@ -1,5 +1,14 @@
2009-04-04 Nicolas François <nicolas.francois at centraliens.net>
+ * src/chage.c: When no shadow entry exist, thedefault sp_lstchg
+ value should be -1 (no aging) rather than 0 (password must be
+ changed).
+ * src/chage.c: For password expiration and inactivity, indicate
+ that the password must be changed when sp_lstchg is null rather
+ than indicating that expiration and inactivity are not enabled.
+
+2009-04-04 Nicolas François <nicolas.francois at centraliens.net>
+
* libmisc/isexpired.c: Document the isexpired return value.
2009-04-04 Nicolas François <nicolas.francois at centraliens.net>
Modified: upstream/trunk/src/chage.c
===================================================================
--- upstream/trunk/src/chage.c 2009-04-05 21:23:06 UTC (rev 2585)
+++ upstream/trunk/src/chage.c 2009-04-05 21:23:17 UTC (rev 2586)
@@ -322,8 +322,11 @@
* date plus the number of days the password is valid for.
*/
(void) fputs (_("Password expires\t\t\t\t\t: "), stdout);
- if ((lastday <= 0) || (maxdays >= (10000 * (DAY / SCALE)))
- || (maxdays < 0)) {
+ if (lastday == 0) {
+ (void) puts (_("password must be changed"));
+ } else if ( (lastday < 0)
+ || (maxdays >= (10000 * (DAY / SCALE)))
+ || (maxdays < 0)) {
(void) puts (_("never"));
} else {
expires = changed + maxdays * SCALE;
@@ -337,8 +340,12 @@
* active will be disabled.
*/
(void) fputs (_("Password inactive\t\t\t\t\t: "), stdout);
- if ((lastday <= 0) || (inactdays < 0) ||
- (maxdays >= (10000 * (DAY / SCALE))) || (maxdays < 0)) {
+ if (lastday == 0) {
+ (void) puts (_("password must be changed"));
+ } else if ( (lastday < 0)
+ || (inactdays < 0)
+ || (maxdays >= (10000 * (DAY / SCALE)))
+ || (maxdays < 0)) {
(void) puts (_("never"));
} else {
expires = changed + (maxdays + inactdays) * SCALE;
@@ -720,7 +727,7 @@
mindays = -1;
}
if (!dflg) {
- lastday = 0;
+ lastday = -1;
}
if (!Wflg) {
warndays = -1;
More information about the Pkg-shadow-commits
mailing list