bugfindutils - Bugs: bug #19806, Predicate -samefile potentially...

 
 

bug #19806: Predicate -samefile potentially fooled by inode reuse

Submitted by:  James Youngman <jay>
Submitted on:  Sat 05 May 2007 12:25:54 PM UTC  
 
Category: NoneSeverity: 2 - Minor
Item Group: Wrong resultStatus: Fixed
Privacy: PublicAssigned to: James Youngman <jay>
Originator Name: Open/Closed: Closed
Release: NoneFixed Release: 4.3.5

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Sat 05 May 2007 12:43:42 PM UTC, 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.

James Youngman <jay>
Project AdministratorIn charge of this item.
Sat 05 May 2007 12:25:54 PM UTC, original submission:

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.

James Youngman <jay>
Project AdministratorIn charge of this item.

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by jay (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 3 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sat 05 May 2007 01:26:21 PM UTCjayOpen/ClosedOpen=>Closed
      Fixed ReleaseNone=>4.3.5
    Sat 05 May 2007 12:43:42 PM UTCjayStatusNone=>Fixed

    Back to the top


    Powered by Savane 3.1-cleanup1