Bug 124699
Summary: | rm calls access() on its target which is not a good idea | ||
---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | David Howells <dhowells> |
Component: | coreutils | Assignee: | Tim Waugh <twaugh> |
Status: | CLOSED RAWHIDE | QA Contact: | |
Severity: | medium | Docs Contact: | |
Priority: | medium | ||
Version: | 2 | ||
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | 5.2.1-12 | Doc Type: | Bug Fix |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2004-06-02 18:20:47 UTC | Type: | --- |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
David Howells
2004-05-28 16:30:47 UTC
Please try coreutils-5.2.1-12, which has a patch from Jim Meyering for this problem. Here's what Jim Meyering says about this patch by the way:
> Unfortunately, rm (without -f) must call access (via euidaccess) to
> determine whether it needs to issue a prompt. With this patch, rm now
> calls both lstat and access for each non-symlink it might unlink.
> Another good reason to use -f.
Okay. I think I see what this is getting at... you use access(W_OK) to decide whether to issue a prompt or not. BTW, I tried coreutils-5.2.1-12, and that seems to evade the problem of dodgy symlinks by lstat'ing them first, which will do. David |