udhcpd: add code which rejects lease files with suspicious or old timestamp.

*: s/time(0)/time(NULL)/g
This commit is contained in:
Denis Vlasenko
2009-02-02 10:48:06 +00:00
parent 512c8ae053
commit 04158e0459
11 changed files with 45 additions and 43 deletions

View File

@ -159,7 +159,7 @@ int rtcwake_main(int argc UNUSED_PARAM, char **argv)
bb_error_msg_and_die("%s not enabled for wakeup events", rtcname);
/* relative or absolute alarm time, normalized to time_t */
sys_time = time(0);
sys_time = time(NULL);
if (sys_time == (time_t)-1)
bb_perror_msg_and_die("read system time");
rtc_time = rtc_read_time(fd, utc);