]> git.pld-linux.org Git - packages/shadow.git/blame - shadow-chage_expdays.patch
- packaged new manuals
[packages/shadow.git] / shadow-chage_expdays.patch
CommitLineData
11492b73
ER
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
60286d9a 3@@ -84,7 +84,7 @@
4 extern int sp_dbm_mode;
883d7600 5 #endif
d6ecb3f3 6
60286d9a 7-#define EPOCH "1969-12-31"
8+#define EPOCH_SHORT "12/31/69"
d6ecb3f3 9
883d7600 10 /* local function prototypes */
11 static void usage (void);
60286d9a 12@@ -168,7 +168,7 @@
13 change_field (buf, sizeof buf,
14 _("Last Password Change (YYYY-MM-DD)"));
15
16- if (strcmp (buf, EPOCH) == 0)
17+ if (strcmp (buf, EPOCH_SHORT) == 0)
18 lastday = -1;
19 else if ((lastday = strtoday (buf)) == -1)
20 return 0;
21@@ -190,7 +190,7 @@
22 change_field (buf, sizeof buf,
23 _("Account Expiration Date (YYYY-MM-DD)"));
24
25- if (strcmp (buf, EPOCH) == 0)
26+ if (strcmp (buf, EPOCH_SHORT) == 0)
27 expdays = -1;
28 else if ((expdays = strtoday (buf)) == -1)
29 return 0;
11492b73
ER
30@@ -274,7 +274,7 @@
31 * password expiring or not.
650a2b39 32 */
60286d9a 33 printf (_("Account expires\t\t\t\t\t\t: "));
11492b73 34- if (expdays < 0) {
650a2b39 35+ if (expdays == -1) {
60286d9a 36 printf (_("never\n"));
650a2b39 37 } else {
38 expires = expdays * SCALE;
11492b73
ER
39@@ -403,7 +403,10 @@
40 case 'E':
41 Eflg++;
42 if (!isnum (optarg))
43- expdays = strtoday (optarg);
44+ if (strcmp (optarg, EPOCH_SHORT) == 0)
45+ expdays = -1;
46+ else
47+ expdays = strtoday (optarg);
48 else
49 expdays = strtol (optarg, 0, 10);
50 break;
This page took 0.046603 seconds and 4 git commands to generate.