URL:
<http://savann
ah.gnu.org/bugs/?19806>
Summary: Predicate -samefile potentially
fooled by inode
reuse
Project: findutils
Submitted by: jay
Submitted on: Saturday 05/05/2007 at 12:25
Category: None
Severity: 2 - Minor
Item Group: Wrong result
Status: None
Privacy: Public
Assigned to: jay
Originator Name:
Originator Email:
Open/Closed: Open
Discussion Lock: Any
Release: None
Fixed Release: None
_______________________________________________________
Details:
The -samefile predicate checks the identity of a candidate
file against the
identity of a reference file on the command line. They are
deemed to be the
same if they have the same inode and device numbers.
This test can be fooled if the reference file is deleted
after find starts
and the indoe number is reused for a new file. The find
program can
erroneously believe that the new file bearing the same inode
number is in
fact the same file as the original reference file. This
causes -samefile to
produce false positives.
To fix this, we should hold a file descriptor open on the
reference file
(unless it is a symbolic link and the -P option is active).
That will
prevent reuse of the inode number.
_______________________________________________________
Reply to this item at:
<http://savann
ah.gnu.org/bugs/?19806>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
_______________________________________________
Bug-findutils mailing list
Bug-findutils gnu.org
h
ttp://lists.gnu.org/mailman/listinfo/bug-findutils
|