Bug 470912 - sed incorrectly follows symlinks
sed incorrectly follows symlinks
Status: CLOSED NEXTRELEASE
Product: Fedora
Classification: Fedora
Component: sed (Show other bugs)
rawhide
All Linux
medium Severity medium
: ---
: ---
Assigned To: Jiri Moskovcak
Fedora Extras Quality Assurance
: Reopened
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2008-11-10 15:42 EST by Arkadiusz Miskiewicz
Modified: 2015-02-01 17:48 EST (History)
3 users (show)

See Also:
Fixed In Version: 4.1.5-11.fc9
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-03-09 18:56:20 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
don't do stupid things if dirname returns a current dir - . (dot) (779 bytes, patch)
2008-11-10 15:42 EST, Arkadiusz Miskiewicz
no flags Details | Diff

  None (edit)
Description Arkadiusz Miskiewicz 2008-11-10 15:42:42 EST
Created attachment 323116 [details]
don't do stupid things if dirname returns a current dir - . (dot)

Description of problem:

sed tries to follow symlink but it does it in a wrong way. dirname() returns "." and code in follow.patch treats it as some longer dirs.


Version-Release number of selected component (if applicable):

fedora cvs version as of today

How reproducible:

Always. Note that I don't use FC but I use sed in the same version with the same patches applied.

Steps to Reproduce:

[arekm@carme-pld ~/test/1]$ ls -al a b
lrwxrwxrwx 1 arekm users 1 lis 10 21:08 a -> b
-rw-r--r-- 1 arekm users 0 lis 10 21:08 b
[arekm@carme-pld ~/test/1]$ sed -i -e 's#1#2#g'  a
sed: ck_follow_symlink: couldn't lstat a/b: Nie jest katalogiem

Actual results:

Error above.

Expected results:

No error.

Additional info:
Comment 1 Fedora Update System 2008-11-13 11:45:01 EST
sed-4.1.5-11.fc10 has been submitted as an update for Fedora 10.
http://admin.fedoraproject.org/updates/sed-4.1.5-11.fc10
Comment 2 Jiri Moskovcak 2008-11-13 11:54:00 EST
Fixed in rawhide (sed-4.1.5-11).
Comment 3 Fedora Update System 2008-12-02 20:09:58 EST
sed-4.1.5-11.fc10 has been pushed to the Fedora 10 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 4 Milos Jakubicek 2009-01-30 04:11:49 EST
Please fix this also in F9! Thank you.
Comment 5 Milos Jakubicek 2009-02-13 19:37:49 EST
Reopening -- F9 fix still needed.
Comment 6 Fedora Update System 2009-02-28 12:07:10 EST
sed-4.1.5-11.fc9 has been submitted as an update for Fedora 9.
http://admin.fedoraproject.org/updates/sed-4.1.5-11.fc9
Comment 7 Fedora Update System 2009-03-02 12:02:04 EST
sed-4.1.5-11.fc9 has been pushed to the Fedora 9 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing-newkey update sed'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F9/FEDORA-2009-2232
Comment 8 Fedora Update System 2009-03-09 18:56:16 EDT
sed-4.1.5-11.fc9 has been pushed to the Fedora 9 stable repository.  If problems still persist, please make note of it in this bug report.

Note You need to log in before you can comment on or make changes to this bug.