Bug 110761

Summary: dangerous code in /etc/rc.d/rc
Product: [Fedora] Fedora Reporter: Pádraig Brady <p>
Component: initscriptsAssignee: Bill Nottingham <notting>
Status: CLOSED RAWHIDE QA Contact: Brock Organ <borgan>
Severity: medium Docs Contact:
Priority: medium    
Version: rawhideCC: bjohnson, leonard-rh-bugzilla, mitr, nmiell, rvokal
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: 8.42-1 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2006-09-21 17:20:49 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 150224, 171491    

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.