Bug 490473 - sed does not handle inline edits of symlinks with no dir portion
Summary: sed does not handle inline edits of symlinks with no dir portion
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: sed
Version: 5.3
Hardware: All
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: Vojtech Vitek
QA Contact: BaseOS QE
URL:
Whiteboard:
Depends On: 502934
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-03-16 16:18 UTC by Martin Poole
Modified: 2018-11-14 17:14 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-03-30 07:55:25 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
patch to find basename using basename rather than dirname (1.29 KB, patch)
2009-03-16 16:18 UTC, Martin Poole
no flags Details | Diff
Patch based on upstream sed-4.2.1 and comment #7 (5.26 KB, patch)
2011-03-09 12:11 UTC, Vojtech Vitek
no flags Details | Diff
Patch based on upstream sed-4.2.1 and comment #7 (3.77 KB, patch)
2011-03-09 12:35 UTC, Vojtech Vitek
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2011:0397 0 normal SHIPPED_LIVE sed bug fix update 2011-03-30 07:55:17 UTC

Description Martin Poole 2009-03-16 16:18:41 UTC
Created attachment 335365 [details]
patch to find basename using basename rather than dirname

Description of problem:

When executing on a symlink in present working directory, sed does not build the original path correctly, thus failing to follow the symlink.

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

sed-4.1.5-5.fc6

How reproducible:

Always.

Steps to Reproduce:
1. echo "zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz" >1
2. ln -s 1 2
3. sed -i -e 's/z/a/g' 2

Actual results:

sed: ck_follow_symlink: couldn't lstat 2/1: Not a directory

Expected results:

All z's in the file should be replaced with a's.  


Additional info:

Comment 1 RHEL Program Management 2009-03-16 16:21:47 UTC
This bugzilla has Keywords: Regression.  

Since no regressions are allowed between releases, 
it is also being proposed as a blocker for this release.  

Please resolve ASAP.

Comment 2 Jiri Moskovcak 2009-06-16 08:37:01 UTC
Are you sure this is the correct version from el5, it has the fc6 dist tag.

Comment 3 Issue Tracker 2009-06-16 08:50:53 UTC
Event posted on 06-16-2009 04:50am EDT by spoyarek

Yes, verified once again from RHN. It's in the "Red Hat Enterprise Linux
(v. 5 for $arch)" channels.


This event sent from IssueTracker by spoyarek 
 issue 276041

Comment 5 Radek Vokál 2009-06-16 09:07:15 UTC
Ok, so this problem is in RHEL5 since GA. Than I don't understand why it is marked as regression. Since the patch looks simple enough, I'm removing the regression flag and proposing this bug for 5.5 fastrack.

Comment 6 Issue Tracker 2009-06-16 09:21:29 UTC
Event posted on 06-16-2009 05:21am EDT by spoyarek

It is a regression of the latest patch (Fix handling of relative symlinks
(#205122)), which is why I marked it as such. I accidentally overlooked
the fact that it was the first RHEL-5 released package.


This event sent from IssueTracker by spoyarek 
 issue 276041

Comment 15 Vojtech Vitek 2011-03-09 12:11:22 UTC
Created attachment 483178 [details]
Patch based on upstream sed-4.2.1 and comment #7

Comment 16 Vojtech Vitek 2011-03-09 12:35:30 UTC
Created attachment 483199 [details]
Patch based on upstream sed-4.2.1 and comment #7

Sorry, there was some unnecessary mess in previous attachment.

Comment 20 errata-xmlrpc 2011-03-30 07:55:25 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2011-0397.html


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