This service will be undergoing maintenance at 00:00 UTC, 2016-08-01. It is expected to last about 1 hours
Bug 241889 - xm top just uses PATH, but sbin might not be in the users path
xm top just uses PATH, but sbin might not be in the users path
Status: CLOSED WONTFIX
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: xen (Show other bugs)
5.0
All Linux
medium Severity medium
: ---
: ---
Assigned To: Richard W.M. Jones
:
Depends On: 188171
Blocks:
  Show dependency treegraph
 
Reported: 2007-05-31 10:41 EDT by Richard W.M. Jones
Modified: 2008-01-17 12:47 EST (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2008-01-17 12:47:56 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Richard W.M. Jones 2007-05-31 10:41:45 EDT
+++ This bug was initially created as a clone of Bug #188171 +++

Description of problem:
Fedora doesn't put /sbin and /usr/sbin into a non-root path, so if a user does
sudo /usr/sbin/xm top you get a python traceback (a simple command not found
error message, would also be much nicer).

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

How reproducible:
always
Comment 1 Richard W.M. Jones 2007-05-31 10:42:35 EDT
This is still happening in RHEL 5 nightly:

[root@localhost console]# /usr/sbin/xm top
Unexpected error: exceptions.OSError

Please report to xen-devel@lists.xensource.com
Traceback (most recent call last):
  File "/usr/sbin/xm", line 10, in ?
    main.main(sys.argv)
  File "/usr/lib64/python2.4/site-packages/xen/xm/main.py", line 1460, in main
    rc = cmd(args)
  File "/usr/lib64/python2.4/site-packages/xen/xm/main.py", line 1037, in xm_top
    os.execvp('xentop', ['xentop'])
  File "/usr/lib64/python2.4/os.py", line 341, in execvp
    _execvpe(file, args)
  File "/usr/lib64/python2.4/os.py", line 379, in _execvpe
    func(fullname, *argrest)
OSError: [Errno 2] No such file or directory

but:

[root@localhost console]# PATH=/usr/sbin:$PATH xm top

(works)
Comment 2 Richard W.M. Jones 2008-01-17 12:47:56 EST
Use virt-top instead of xm top.

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