Bug 241889 - xm top just uses PATH, but sbin might not be in the users path
Summary: xm top just uses PATH, but sbin might not be in the users path
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: xen
Version: 5.0
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
: ---
Assignee: Richard W.M. Jones
QA Contact:
URL:
Whiteboard:
Depends On: 188171
Blocks:
TreeView+ depends on / blocked
 
Reported: 2007-05-31 14:41 UTC by Richard W.M. Jones
Modified: 2008-01-17 17:47 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2008-01-17 17:47:56 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Richard W.M. Jones 2007-05-31 14:41:45 UTC
+++ 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 14:42:35 UTC
This is still happening in RHEL 5 nightly:

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

Please report to xen-devel.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 17:47:56 UTC
Use virt-top instead of xm top.


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