Bug 110761 - dangerous code in /etc/rc.d/rc
dangerous code in /etc/rc.d/rc
Product: Fedora
Classification: Fedora
Component: initscripts (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Bill Nottingham
Brock Organ
Depends On:
Blocks: 171491 FC6Blocker
  Show dependency treegraph
Reported: 2003-11-24 10:03 EST by Pádraig Brady
Modified: 2014-03-16 22:40 EDT (History)
5 users (show)

See Also:
Fixed In Version: 8.42-1
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2006-09-21 13:20:49 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Pádraig Brady 2003-11-24 10:03:10 EST
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):

How reproducible:

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

Additional info:
Comment 1 Nicholas Miell 2005-01-13 20:35:51 EST
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 13:20:49 EDT
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.