Subject: bin/4925: dhcpd uses bogus time conversions
To: None <gnats-bugs@gnats.netbsd.org>
From: None <christos@zoulas.com>
List: netbsd-bugs
Date: 01/31/1998 17:01:40
>Number: 4925
>Category: bin
>Synopsis: dhcpd uses bogus time conversions
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: bin-bug-people (Utility Bug People)
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sat Jan 31 08:05:01 1998
>Last-Modified:
>Originator: Christos Zoulas
>Organization:
Astron Software
>Release: Oct 24 1997
>Environment:
System: NetBSD gw.commerzbank.com 1.3A NetBSD 1.3A (DIGITAL) #7: Sat Dec 20 18:42:43 EST 1997 christos@gw.commerzbank.com:/usr/local/src/sys/arch/i386/compile/DIGITAL i386
>Description:
1. The lease date format is bogus. It should not include the
weekday! Since it includes the weekday, it uses tm_wday
(0-6) so that strftime(3) cannot be used directly (%u is
1-7). server/db.c, client/dhclient.c, common/parse.c
2. parse_date should be using strptime(3) and mktime(3) instead
of home-grown inaccurate versions. common/parse.c
>How-To-Repeat:
>Fix:
1. remove the weekday from the lease format.
2. use strptime/strftime/mktime.
>Audit-Trail:
>Unformatted: