]> git.pld-linux.org Git - packages/shadow.git/blame - shadow-chage_expdays.patch
- added print expire Never if expire date = -1 (12/31/69)
[packages/shadow.git] / shadow-chage_expdays.patch
CommitLineData
d6ecb3f3 1diff -Nur shadow-4.0.0.orig/src/chage.c shadow-4.0.0/src/chage.c
2--- shadow-4.0.0.orig/src/chage.c Mon Oct 9 20:39:50 2000
650a2b39 3+++ shadow-4.0.0/src/chage.c Sat Jun 1 09:27:14 2002
d6ecb3f3 4@@ -121,6 +121,7 @@
5 #define CLOSE_FAIL "failed rewriting %s\n"
6
7 #define EPOCH "1969-12-31"
8+#define EPOCH_SHORT "12/31/69"
9
10 #ifdef SHADOWPWD
11 #define DBMERROR2 "error updating DBM shadow entry.\n"
650a2b39 12@@ -342,7 +343,7 @@
13 */
14
15 printf(_("Account Expires:\t"));
16- if (expdays <= 0) {
17+ if (expdays == -1) {
18 printf (_("Never\n"));
19 } else {
20 expires = expdays * SCALE;
d6ecb3f3 21@@ -509,7 +510,10 @@
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 else
31 expdays = strtol (optarg, 0, 10);
32 break;
This page took 0.0873 seconds and 4 git commands to generate.