Bug 1401899

Summary: ntpd service daemonizes ntpd binary without referencing absolute path
Product: Red Hat Enterprise Linux 6 Reporter: Jindrich Novy <jindrich.novy>
Component: ntpAssignee: Miroslav Lichvar <mlichvar>
Status: CLOSED WONTFIX QA Contact: qe-baseos-daemons
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 6.8CC: cww, fhirtz, rupatel
Target Milestone: rcKeywords: EasyFix
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-06-13 18:00:49 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Jindrich Novy 2016-12-06 11:20:40 UTC
Description of problem:
In /etc/rc.d/init.d/ntpd I see:

prog=ntpd
lockfile=/var/lock/subsys/$prog

start() {
        [ "$EUID" != "0" ] && exit 4
        [ "$NETWORKING" = "no" ] && exit 1
        [ -x /usr/sbin/ntpd ] || exit 5
        [ -f /etc/sysconfig/ntpd ] || exit 6
        . /etc/sysconfig/ntpd

        # Start daemons.
        echo -n $"Starting $prog: "
        daemon $prog $OPTIONS

So the service daemonizes $prog without an absolute path specified even though the init script checks for existence of /usr/sbin/ntpd.

Please always use absolute path for daemonizing services. Not referencing absolute path there will cause just 'ntpd', not '/usr/sbin/ntpd' being shown in process table causing our box signoff script to fail because it might lead to execution of unwanted/subverted ntpd present ahead of /usr/sbin in a search path.

Version-Release number of selected component (if applicable):
/usr/sbin/ntpd

How reproducible:
always

Comment 1 Miroslav Lichvar 2016-12-06 11:41:24 UTC
Thanks for the report, Jindrich. This looks like an easy fix. If the issue is important to you, you may want to escalate it through the support.

Comment 2 Jindrich Novy 2016-12-06 13:54:16 UTC
Thanks Mirek. I just filed a support request as well:

https://access.redhat.com/support/cases/#/case/01752931

Comment 4 Frank Hirtz 2016-12-16 19:46:56 UTC
Hi Jindrich, 

We have the support request. We'll use that to get this prioritized and slated for a formal erratum.

Comment 5 Chris Williams 2017-06-13 18:00:49 UTC
Red Hat Enterprise Linux 6 transitioned to the Production 3 Phase on May 10, 2017.  During the Production 3 Phase, Critical impact Security Advisories (RHSAs) and selected Urgent Priority Bug Fix Advisories (RHBAs) may be released as they become available.
 
The official life cycle policy can be reviewed here:
 
http://redhat.com/rhel/lifecycle
 
This issue does not appear to meet the inclusion criteria for the Production Phase 3 and will be marked as CLOSED/WONTFIX. If this remains a critical requirement, please contact Red Hat Customer Support to request a re-evaluation of the issue, citing a clear business justification.  Red Hat Customer Support can be contacted via the Red Hat Customer Portal at the following URL:
 
https://access.redhat.com