19 lines
541 B
Diff
19 lines
541 B
Diff
|
From: Charles Coffing <ccoffing@novell.com>
|
||
|
Upstream: no
|
||
|
|
||
|
Index: xen-unstable/tools/python/xen/xm/main.py
|
||
|
===================================================================
|
||
|
--- xen-unstable.orig/tools/python/xen/xm/main.py
|
||
|
+++ xen-unstable/tools/python/xen/xm/main.py
|
||
|
@@ -1018,6 +1018,10 @@ def xm_sysrq(args):
|
||
|
def xm_top(args):
|
||
|
arg_check(args, "top", 0)
|
||
|
|
||
|
+ # A hack to get a clear error message if ran as non-root
|
||
|
+ if os.geteuid() != 0:
|
||
|
+ raise IOError()
|
||
|
+
|
||
|
os.execvp('xentop', ['xentop'])
|
||
|
|
||
|
def xm_dmesg(args):
|