+2009-04-04 Nicolas François <nicolas.francois@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@centraliens.net>
* libmisc/isexpired.c: Document the isexpired return value.
* 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;
* 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;
mindays = -1;
}
if (!dflg) {
- lastday = 0;
+ lastday = -1;
}
if (!Wflg) {
warndays = -1;