bugGNU Wget - Bugs: bug #20369, File existence race conditions

 
 

bug #20369: File existence race conditions

Submitted by:  Micah Cowan <micahcowan>
Submitted on:  Fri 06 Jul 2007 10:28:51 PM UTC  
 
Category: Program LogicSeverity: 2 - Minor
Priority: 3 - LowStatus: Fixed
Privacy: PublicAssigned to: None
Originator Name: Open/Closed: Closed
Release: NoneOperating System: None
Reproducibility: NoneFixed Release: None
Planned Release: 1.19.2Regression: None
Work Required: 1 - DaysPatch Included: None

Add a New Comment(Rich Markup)
   

You are not logged in

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

 

Mon 21 Apr 2008 09:12:57 PM UTC, comment #1:

To be a bit more specific: Wget should always try to open the file immediately, with O_EXCL. If it fails with an EEXIST, then the file exists; otherwise, we've an open filehandle, guaranteeing that no one else can create one in between our "check" and our "open for write".

Micah Cowan <micahcowan>
Fri 06 Jul 2007 10:28:51 PM UTC, original submission:

Many file existence checks (via file_exists_p) are being done in race conditions: the check is done, and then the file is opened and read later. The open-and-check should be done as one operation.

Micah Cowan <micahcowan>

 

(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 rockdaboot (Updated the item)
  • -unavailable- added by micahcowan (Submitted the item)
  •  

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

     

     

    Follow 7 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Fri 24 Mar 2017 08:53:31 AM UTCrockdabootStatusConfirmed=>Fixed
      Open/ClosedOpen=>Closed
      Planned Release1.15=>1.19.2
    Sun 27 Jan 2008 04:35:16 AM UTCmicahcowanPlanned Release1.12=>1.15
    Wed 01 Aug 2007 04:40:33 AM UTCmicahcowanPriority5 - Normal=>3 - Low
    Fri 20 Jul 2007 03:59:20 AM UTCmicahcowanCategoryNone=>Program Logic
      Planned ReleaseNone=>1.12

    Back to the top


    Powered by Savane 3.1-cleanup1