Bug 470912 - sed incorrectly follows symlinks
Summary: sed incorrectly follows symlinks
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: sed
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Jiri Moskovcak
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2008-11-10 20:42 UTC by Arkadiusz Miskiewicz
Modified: 2015-02-01 22:48 UTC (History)
3 users (show)

Fixed In Version: 4.1.5-11.fc9
Clone Of:
Environment:
Last Closed: 2009-03-09 22:56:20 UTC
Type: ---
Embargoed:


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

Description Arkadiusz Miskiewicz 2008-11-10 20:42:42 UTC
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 16:45:01 UTC
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 16:54:00 UTC
Fixed in rawhide (sed-4.1.5-11).

Comment 3 Fedora Update System 2008-12-03 01:09:58 UTC
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 09:11:49 UTC
Please fix this also in F9! Thank you.

Comment 5 Milos Jakubicek 2009-02-14 00:37:49 UTC
Reopening -- F9 fix still needed.

Comment 6 Fedora Update System 2009-02-28 17:07:10 UTC
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 17:02:04 UTC
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 22:56:16 UTC
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.