Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 12 Jan 2000 06:00:02 -0800 (PST)
From:      Peter Wemm <peter@netplex.com.au>
To:        freebsd-bugs@FreeBSD.org
Subject:   Re: bin/4238 - chpass time delay sensitivity [PATCH] 
Message-ID:  <200001121400.GAA32215@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
The following reply was made to PR bin/4238; it has been noted by GNATS.

From: Peter Wemm <peter@netplex.com.au>
To: Daniel Hagan <dhagan@cs.vt.edu>
Cc: freebsd-gnats-submit@FreeBSD.org
Subject: Re: bin/4238 - chpass time delay sensitivity [PATCH] 
Date: Wed, 12 Jan 2000 21:57:28 +0800

 Daniel Hagan wrote:
 [..]
 >  I would vote for the disgusting hack category myself :).  I was
 >  complaining to John Baldwin (jhb) about it, and he mentioned the
 >  work-around (I never would have thought of it, being too tied to my
 >  anti-disgusting-hack philosophy).  It seems harmless enough in this
 >  special case, but I won't take it personally if someone cans the patch.
 
 Just as a by-the-way, this won't work on a system with a raised securelevel
 which will prevent the time being set backwards.  So don't make it a fatal
 error if the time cannot be set.  Or, if it fails to set back, sleep for a
 second instead...  Or even do a while loop waiting for the current time to
 tick over to the next second and be later than the time on the file (again
 using usleep or something for a 1/10th of a second sleep interval).
 
 The sure-fire way to detect an edit is to do a md5 of the file.  There's
 quite a few examples of code to do this sort of thing around the tree (ie:
 taking the md5 checksum).  Then compare a before-and-after checksum.
 
 Cheers,
 -Peter
 
 


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200001121400.GAA32215>