List Info

Thread: Predicate -samefile potentially fooled by inode reuse




Predicate -samefile potentially fooled by inode reuse
user name
2007-05-05 07:25:55
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-findutilsgnu.org
h
ttp://lists.gnu.org/mailman/listinfo/bug-findutils

Predicate -samefile potentially fooled by inode reuse
user name
2007-05-05 07:43:43
Update of bug #19806 (project findutils):

                  Status:                    None =>
Fixed                  

    _______________________________________________________

Follow-up Comment #1:

This problem is fixed in the CVS code for findutils.
To resolve your problem, you could either wait for the 
next official release of findutils, or check out a copy 
of the code from the CVS repository for findutils.


    _______________________________________________________

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-findutilsgnu.org
h
ttp://lists.gnu.org/mailman/listinfo/bug-findutils

Predicate -samefile potentially fooled by inode reuse
user name
2007-05-05 08:26:21
Update of bug #19806 (project findutils):

             Open/Closed:                    Open =>
Closed                 
           Fixed Release:                    None =>
4.3.5                  


    _______________________________________________________

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-findutilsgnu.org
h
ttp://lists.gnu.org/mailman/listinfo/bug-findutils

[1-3]

about | contact  Other archives ( Real Estate discussion Medical topics )