bugGNU Core Utilities - Bugs: bug #9185, rm calls access() but it shouldn't

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #9185: rm calls access() but it shouldn't

Submitter:  Tim Waugh <twaugh>
Submitted:  Wed 02 Jun 2004 11:52:28 AM UTC
   
 
Category:  None Severity:  3 - Normal
Priority:  5 - Normal Item Group:  None
Status:  Fixed Privacy:  Public
Assigned to:  None Open/Closed:  Closed

Discussion

Tue 21 Dec 2004 07:29:34 AM UTC, comment #1: 

rm has been fixed to invoke lstat before access, to avoid following symlinks into never-never-land.

Paul Eggert <eggert>
Group administrator
Wed 02 Jun 2004 11:52:28 AM UTC, original submission:  

See: https://bugzilla. ... bug.cgi?id=124699

The rm program calls access() on the target file before calling unlink() on it. This is unnecessary (unlink should tell you everything you need to know), and may hang rm (it may be a symlink pointing to something on an unreachable NFS server).
To reproduce the problem:
1. Mount a directory off an NFS server without any special options
(so no -ointr, for example)
2. Make a symlink from somewhere outside that mountpoint to
somewhere inside that mountpoint.
3. Power off the NFS server
4. Try and rm the symlink.

Tim Waugh <twaugh>

 

Attached Files

This item currently has no attached files.

 

Dependencies

This item does not depend on any other items.

No items depend on this one.

 

Mail Notification Carbon-Copy List

 

Votes

There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

 

History

Follow 2 latest changes.

Date Changed by Updated Field Previous Value => Replaced by
2004-12-21 eggert StatusNone Fixed
    Open/ClosedOpen Closed

Back to the top

Powered by Savane 3.16-ed84.
Corresponding source code