]>
Commit | Line | Data |
---|---|---|
883d7600 | 1 | diff -Nur shadow-4.0.3/src/chage.c shadow-4.0.3.new/src/chage.c |
2 | --- shadow-4.0.3/src/chage.c 2002-01-05 16:41:43.000000000 +0100 | |
3 | +++ shadow-4.0.3.new/src/chage.c 2003-05-27 20:42:50.000000000 +0200 | |
4 | @@ -83,6 +83,7 @@ | |
5 | #endif | |
d6ecb3f3 | 6 | |
7 | #define EPOCH "1969-12-31" | |
883d7600 | 8 | +#define EPOCH_SHORT "12/31/69" |
d6ecb3f3 | 9 | |
883d7600 | 10 | /* local function prototypes */ |
11 | static void usage (void); | |
12 | @@ -302,7 +303,7 @@ | |
650a2b39 | 13 | */ |
14 | ||
883d7600 | 15 | printf (_("Account Expires:\t")); |
650a2b39 | 16 | - if (expdays <= 0) { |
17 | + if (expdays == -1) { | |
18 | printf (_("Never\n")); | |
19 | } else { | |
20 | expires = expdays * SCALE; | |
883d7600 | 21 | @@ -440,7 +441,11 @@ |
22 | case 'E': | |
23 | Eflg++; | |
24 | if (!isnum (optarg)) | |
25 | - expdays = strtoday (optarg); | |
26 | + if (strcmp (optarg, EPOCH_SHORT) == 0) | |
27 | + expdays = -1; | |
28 | + else | |
29 | + expdays = strtoday (optarg); | |
30 | + | |
31 | else | |
32 | expdays = strtol (optarg, 0, 10); | |
33 | break; |