Bug 130536 - ntptrace searchs ntpq in $PATH
ntptrace searchs ntpq in $PATH
Product: Fedora
Classification: Fedora
Component: ntp (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Harald Hoyer
Brian Brock
Depends On:
  Show dependency treegraph
Reported: 2004-08-21 07:14 EDT by Ralf Corsepius
Modified: 2007-11-30 17:10 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2004-08-31 08:29:43 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 Ralf Corsepius 2004-08-21 07:14:01 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.2)

Description of problem:
Excuting ntptrace without having /usr/sbin in $PATH produces this:
# /usr/sbin/ntptrace localhost
Can't exec "ntpq": No such file or directory at /usr/sbin/ntptrace
line 22.
failed to start command ntpq -n -c rv localhost: No such file or
directory at /usr/sbin/ntptrace line 22.

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

How reproducible:

Steps to Reproduce:
1. Login as normal user or "su root"
(Without having /usr/bin in $PATH)

2. Invoke

Actual Results:  Non function.

Expected Results:  function.

Additional info:

Origin of this bug is /usr/sbin/ntptrace looking for "ntpq" in $PATH:

From /usr/sbin/ntptrace:
$ntpq = "ntpq";
        $cmd = "$ntpq -n -c rv $host";
        open(PH, $cmd . "|") || die "failed to start command $cmd: $!

A fix would be to hard-code the absolute path to ntpq:
$ntpq = "/usr/sbin/ntpq"

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