]> git.pld-linux.org Git - packages/shadow.git/blob - shadow-chage_expdays.patch
- s,/lib/security,,
[packages/shadow.git] / shadow-chage_expdays.patch
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
6  
7  #define        EPOCH           "1969-12-31"
8 +#define EPOCH_SHORT     "12/31/69"
9  
10  /* local function prototypes */
11  static void usage (void);
12 @@ -302,7 +303,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;
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;
This page took 0.031521 seconds and 3 git commands to generate.