Bug 470912

Summary: sed incorrectly follows symlinks
Product: [Fedora] Fedora Reporter: Arkadiusz Miskiewicz <arekm>
Component: sedAssignee: Jiri Moskovcak <jmoskovc>
Status: CLOSED NEXTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: medium    
Version: rawhideCC: dfediuck, jmoskovc, xjakub
Target Milestone: ---Keywords: Reopened
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: 4.1.5-11.fc9 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-03-09 22:56:20 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:
Attachments:
Description Flags
don't do stupid things if dirname returns a current dir - . (dot) none

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.