Bug 169193 - sed -i segfaults in readonly target directory
sed -i segfaults in readonly target directory
Product: Red Hat Enterprise Linux 3
Classification: Red Hat
Component: sed (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Petr Machata
Ben Levenson
Depends On:
Blocks: RHEL3U8CanFix
  Show dependency treegraph
Reported: 2005-09-24 07:53 EDT by Neil Prockter
Modified: 2015-05-04 21:32 EDT (History)
1 user (show)

See Also:
Fixed In Version: RHBA-2006-0362
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2006-07-20 11:06:33 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
sed-4.0.7-i-mkstemp.patch (775 bytes, patch)
2005-09-27 10:58 EDT, Jakub Jelinek
no flags Details | Diff

External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2006:0362 normal SHIPPED_LIVE sed bug fix update 2006-07-19 15:16:00 EDT

  None (edit)
Description Neil Prockter 2005-09-24 07:53:37 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.10) Gecko/20050909 Fedora/1.0.6-1.2.fc4 Firefox/1.0.6

Description of problem:
sed -i segfaults when the target file is in a readonly directory

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

How reproducible:

Steps to Reproduce:
1. mkdir -p testcases/sed
2. cd testcases/sed
3. mkdir readonly
4. echo hello\\nhello again > readonly/testfile
5. chmod 500 readonly
6. sed -i -e 2d readonly/testfile

Actual Results:  Segmentation fault

Expected Results:  at least
sed: couldn't open temporary file readonly//sedEpzma8: Permission denied
at best use a temp file elsewhere

Additional info:

rhel4 with sed-4.1.2-4 more correctly gives 
sed: couldn't open temporary file readonly//sedEpzma8: Permission denied
(but why not make a tempfile somewhere else in this case)
Comment 1 Jakub Jelinek 2005-09-27 10:58:21 EDT
Created attachment 119298 [details]

Comment 8 Bob Johnson 2006-04-11 11:50:25 EDT
This issue is on Red Hat Engineering's list of planned work items 
for the upcoming Red Hat Enterprise Linux 3.8 release.  Engineering 
resources have been assigned and barring unforeseen circumstances, Red 
Hat intends to include this item in the 3.8 release.
Comment 13 Red Hat Bugzilla 2006-07-20 11:06:34 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 the 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.


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