summaryrefslogtreecommitdiffstats
path: root/sbin/dhclient/parse.c
diff options
context:
space:
mode:
authorkrw <krw@openbsd.org>2017-06-22 15:08:53 +0000
committerkrw <krw@openbsd.org>2017-06-22 15:08:53 +0000
commitc12a7b557a41361d10d5ab1834cdd437f33f32eb (patch)
treea35a9d6a1f127dbb29034e14ba18133634820469 /sbin/dhclient/parse.c
parentImprove the coalescing of instruction cache flushes on R8000 in order (diff)
downloadwireguard-openbsd-c12a7b557a41361d10d5ab1834cdd437f33f32eb.tar.xz
wireguard-openbsd-c12a7b557a41361d10d5ab1834cdd437f33f32eb.zip
Drop support for old (>4yr) timestamp formats in leases
files. ok tb@ millert@
Diffstat (limited to 'sbin/dhclient/parse.c')
-rw-r--r--sbin/dhclient/parse.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/sbin/dhclient/parse.c b/sbin/dhclient/parse.c
index d1f5bb2140d..85f92432b4f 100644
--- a/sbin/dhclient/parse.c
+++ b/sbin/dhclient/parse.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: parse.c,v 1.52 2017/06/19 19:28:35 krw Exp $ */
+/* $OpenBSD: parse.c,v 1.53 2017/06/22 15:08:53 krw Exp $ */
/* Common parser code for dhcpd and dhclient. */
@@ -399,14 +399,8 @@ parse_date(FILE *cfile)
memset(&tm, 0, sizeof(tm)); /* 'cuz strptime ignores tm_isdt. */
p = strptime(timestr, DB_TIMEFMT, &tm);
if (p == NULL || *p != '\0') {
- p = strptime(timestr, OLD_DB_TIMEFMT, &tm);
- if (p == NULL || *p != '\0') {
- p = strptime(timestr, BAD_DB_TIMEFMT, &tm);
- if (p == NULL || *p != '\0') {
- parse_warn("unparseable time string");
- return (0);
- }
- }
+ parse_warn("unparseable time string");
+ return (0);
}
guess = timegm(&tm);