aboutsummaryrefslogtreecommitdiff
path: root/usr.bin/chpass
diff options
context:
space:
mode:
authorDaniel O'Callaghan <danny@FreeBSD.org>1999-01-18 22:15:09 +0000
committerDaniel O'Callaghan <danny@FreeBSD.org>1999-01-18 22:15:09 +0000
commitea5cc207d2a36f299dfc21b46255ca426a3879ed (patch)
treefd8c39bef03502982bfb8567af8ce8a7060db1a9 /usr.bin/chpass
parentd800ff4aed31bda152cf52c789b29d1e9517e8d5 (diff)
Notes
Diffstat (limited to 'usr.bin/chpass')
-rw-r--r--usr.bin/chpass/util.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/usr.bin/chpass/util.c b/usr.bin/chpass/util.c
index 132c1514f99a..d8917f51bc96 100644
--- a/usr.bin/chpass/util.c
+++ b/usr.bin/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;