]> git.ipfire.org Git - thirdparty/e2fsprogs.git/commit
Fix blkid's last verification logic to work when the system clock is insane
authorTheodore Ts'o <tytso@mit.edu>
Mon, 13 Mar 2006 04:25:15 +0000 (23:25 -0500)
committerTheodore Ts'o <tytso@mit.edu>
Mon, 13 Mar 2006 04:25:15 +0000 (23:25 -0500)
commite324b250593a32680309015eba7c6c5db7851227
treee81329682fb802cb3f655b66feff6fbf26e05b6b
parent3f546fcc27e9bfca8d365c4d78c6e6c99ca32512
Fix blkid's last verification logic to work when the system clock is insane

Users have reported problems on newly installed systems when the
Macintosh's system clock battery is dead and the hardware clock is
returning a date of 1904.  Turns out there were some bugs in handling
dates before the Unix epoch.

Addresses Red Hat Bug: #182188

probe.c (blkid_verify): Fix the bid_time sanity checking logic,
so that if last verification time is more recent than the
current time, or the comparison between the last
verification time and the current time causes an overflow,
a device verification will take place.

devname.c (blkid_get_dev): Set the initial bid_time to be
INT_MIN, to guarantee that blkid_verify will always be run
even when the system clock is insane.

dev.c (blkid_debug_dump_dev), read.c (debug_dump_dev),
save.c (save_dev): Fix the printf format for dev->bid_time
to match the fact that it is an signed type.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
lib/blkid/ChangeLog
lib/blkid/dev.c
lib/blkid/devname.c
lib/blkid/probe.c
lib/blkid/read.c
lib/blkid/save.c