1 --- shadow-4.0.6/src/chage.c 2004-11-18 21:36:19.617616944 +0100
2 +++ shadow-4.0.16/src/chage.c 2006-06-08 00:30:20.837211299 +0300
4 extern int sp_dbm_mode;
7 -#define EPOCH "1969-12-31"
8 +#define EPOCH_SHORT "12/31/69"
10 /* local function prototypes */
11 static void usage (void);
13 change_field (buf, sizeof buf,
14 _("Last Password Change (YYYY-MM-DD)"));
16 - if (strcmp (buf, EPOCH) == 0)
17 + if (strcmp (buf, EPOCH_SHORT) == 0)
19 else if ((lastday = strtoday (buf)) == -1)
22 change_field (buf, sizeof buf,
23 _("Account Expiration Date (YYYY-MM-DD)"));
25 - if (strcmp (buf, EPOCH) == 0)
26 + if (strcmp (buf, EPOCH_SHORT) == 0)
28 else if ((expdays = strtoday (buf)) == -1)
31 * password expiring or not.
33 printf (_("Account expires\t\t\t\t\t\t: "));
35 + if (expdays == -1) {
36 printf (_("never\n"));
38 expires = expdays * SCALE;
43 - expdays = strtoday (optarg);
44 + if (strcmp (optarg, EPOCH_SHORT) == 0)
47 + expdays = strtoday (optarg);
49 expdays = strtol (optarg, 0, 10);