summaryrefslogtreecommitdiffstats
path: root/chpass/util.c
diff options
context:
space:
mode:
Diffstat (limited to 'chpass/util.c')
-rw-r--r--chpass/util.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/chpass/util.c b/chpass/util.c
index 132c151..d8917f5 100644
--- a/chpass/util.c
+++ b/chpass/util.c
@@ -36,7 +36,7 @@
static char sccsid[] = "@(#)util.c 8.4 (Berkeley) 4/2/94";
#endif
static const char rcsid[] =
- "$Id$";
+ "$Id: util.c,v 1.6 1998/03/23 07:41:49 charnier Exp $";
#endif /* not lint */
#include <sys/types.h>
@@ -115,9 +115,12 @@ atot(p, store)
year = atoi(t);
if (day < 1 || day > 31 || month < 1 || month > 12 || !year)
goto bad;
- if (year < 100)
+ /* Allow two digit years 1969-2068 */
+ if (year < 69)
+ year += 2000;
+ else if (year < 100)
year += 1900;
- if (year <= 1970)
+ if (year < 1969)
bad: return (1);
lt->tm_year = year - 1900;
lt->tm_mon = month - 1;