Bug 490473 - sed does not handle inline edits of symlinks with no dir portion
sed does not handle inline edits of symlinks with no dir portion
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: sed (Show other bugs)
5.3
All Linux
medium Severity medium
: rc
: ---
Assigned To: Vojtech Vitek
BaseOS QE
:
Depends On: 502934
Blocks:
  Show dependency treegraph
 
Reported: 2009-03-16 12:18 EDT by Martin Poole
Modified: 2015-03-04 18:56 EST (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2011-03-30 03:55:25 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)
patch to find basename using basename rather than dirname (1.29 KB, patch)
2009-03-16 12:18 EDT, Martin Poole
no flags Details | Diff
Patch based on upstream sed-4.2.1 and comment #7 (5.26 KB, patch)
2011-03-09 07:11 EST, Vojtech Vitek
no flags Details | Diff
Patch based on upstream sed-4.2.1 and comment #7 (3.77 KB, patch)
2011-03-09 07:35 EST, Vojtech Vitek
no flags Details | Diff

  None (edit)
Description Martin Poole 2009-03-16 12:18:41 EDT
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 Product and Program Management 2009-03-16 12:21:47 EDT
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 04:37:01 EDT
Are you sure this is the correct version from el5, it has the fc6 dist tag.
Comment 3 Issue Tracker 2009-06-16 04:50:53 EDT
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 Vokal 2009-06-16 05:07:15 EDT
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 05:21:29 EDT
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 07:11:22 EST
Created attachment 483178 [details]
Patch based on upstream sed-4.2.1 and comment #7
Comment 16 Vojtech Vitek 2011-03-09 07:35:30 EST
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 03:55:25 EDT
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.