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
Item Group:  None Status:  Fixed
Privacy:  Public Assigned to:  None
Open/Closed:  Closed

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.redhat.com/bugzilla/show_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>

 

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

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

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.

 

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.13-f8d8.
Corresponding source code