]> git.pld-linux.org Git - packages/shadow.git/blobdiff - shadow-chage_expdays.patch
- added -removed-programs.patch
[packages/shadow.git] / shadow-chage_expdays.patch
index bdca4356abab6007e704ddd93f91e185652c09fb..880ebbaff211da63b13a16f3c2218854922665e8 100644 (file)
@@ -1,18 +1,45 @@
-diff -Nur shadow-4.0.0.orig/src/chage.c shadow-4.0.0/src/chage.c
---- shadow-4.0.0.orig/src/chage.c      Mon Oct  9 20:39:50 2000
-+++ shadow-4.0.0/src/chage.c   Fri May 31 18:39:12 2002
-@@ -121,6 +121,7 @@
- #define       CLOSE_FAIL      "failed rewriting %s\n"
+--- shadow-4.0.6/src/chage.c   2004-11-18 21:36:19.617616944 +0100
++++ shadow-4.0.16/src/chage.c  2006-06-08 00:30:20.837211299 +0300
+@@ -84,7 +84,7 @@
+ extern int sp_dbm_mode;
+ #endif
  
- #define       EPOCH           "1969-12-31"
+-#define       EPOCH           "1969-12-31"
 +#define       EPOCH_SHORT     "12/31/69"
  
- #ifdef        SHADOWPWD
- #define       DBMERROR2       "error updating DBM shadow entry.\n"
-@@ -509,7 +510,10 @@
+ /* local function prototypes */
+ static void usage (void);
+@@ -168,7 +168,7 @@
+       change_field (buf, sizeof buf,
+                     _("Last Password Change (YYYY-MM-DD)"));
+-      if (strcmp (buf, EPOCH) == 0)
++      if (strcmp (buf, EPOCH_SHORT) == 0)
+               lastday = -1;
+       else if ((lastday = strtoday (buf)) == -1)
+               return 0;
+@@ -190,7 +190,7 @@
+       change_field (buf, sizeof buf,
+                     _("Account Expiration Date (YYYY-MM-DD)"));
+-      if (strcmp (buf, EPOCH) == 0)
++      if (strcmp (buf, EPOCH_SHORT) == 0)
+               expdays = -1;
+       else if ((expdays = strtoday (buf)) == -1)
+               return 0;
+@@ -274,7 +274,7 @@
+        * password expiring or not.
+        */
+       printf (_("Account expires\t\t\t\t\t\t: "));
+-      if (expdays < 0) {
++      if (expdays == -1) {
+               printf (_("never\n"));
+       } else {
+               expires = expdays * SCALE;
+@@ -403,7 +403,10 @@
                        case 'E':
                                Eflg++;
-                               if (!isnum(optarg))
+                               if (!isnum (optarg))
 -                                      expdays = strtoday (optarg);
 +                                      if (strcmp (optarg, EPOCH_SHORT) == 0)
 +                                              expdays = -1;
This page took 0.037725 seconds and 4 git commands to generate.