Bug 110761 - dangerous code in /etc/rc.d/rc
Summary: dangerous code in /etc/rc.d/rc
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: initscripts
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Bill Nottingham
QA Contact: Brock Organ
URL:
Whiteboard:
Depends On:
Blocks: FC6Blocker 171491
TreeView+ depends on / blocked
 
Reported: 2003-11-24 15:03 UTC by Pádraig Brady
Modified: 2014-03-17 02:40 UTC (History)
5 users (show)

Fixed In Version: 8.42-1
Clone Of:
Environment:
Last Closed: 2006-09-21 17:20:49 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Pádraig Brady 2003-11-24 15:03:10 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5) Gecko/20031016

Description of problem:
This caused me major problems. If my script
contains the words daemon, action, success or failure
then it's treated differently. The appropriate line is:

if egrep -q "(daemon |action |success |failure )" $i 2>/dev/null

There really should be something more robust here, like
checking for "KEYWORD: action" etc.

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

How reproducible:
Always

Steps to Reproduce:
try to get output from an initscript to console :-)

Additional info:

Comment 1 Nicholas Miell 2005-01-14 01:35:51 UTC
To clarify, if an init script contains any of the strings "daemon ", "action ",
"success ", or "failure ", /etc/rc.d/rc will exec it using

    '$i start'

otherwise it will exec it using

    'action $"Starting $subsys: " $i start'

This is prone to false positives and is causing the original reporter problems.

This is still applicable in initscripts 8.03 (i.e. lastest rawhide).

Comment 2 Bill Nottingham 2006-09-21 17:20:49 UTC
Fix in CVS, will be in 8.42-1.


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