Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 169193 - sed -i segfaults in readonly target directory
Summary: sed -i segfaults in readonly target directory
Alias: None
Product: Red Hat Enterprise Linux 3
Classification: Red Hat
Component: sed
Version: 3.0
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Petr Machata
QA Contact: Ben Levenson
Whiteboard: RHEL3U7NAK
Depends On:
Blocks: RHEL3U8CanFix
TreeView+ depends on / blocked
Reported: 2005-09-24 11:53 UTC by Neil Prockter
Modified: 2015-05-05 01:32 UTC (History)
1 user (show)

Fixed In Version: RHBA-2006-0362
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2006-07-20 15:06:33 UTC
Target Upstream Version:

Attachments (Terms of Use)
sed-4.0.7-i-mkstemp.patch (deleted)
2005-09-27 14:58 UTC, Jakub Jelinek
no flags Details | Diff

System ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2006:0362 normal SHIPPED_LIVE sed bug fix update 2006-07-19 19:16:00 UTC

Description Neil Prockter 2005-09-24 11:53:37 UTC
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 14:58:21 UTC
Created attachment 119298 [details]


Comment 8 Bob Johnson 2006-04-11 15:50:25 UTC
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 15:06:34 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 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.