Skip to contentSkip to conversation

warning when not running "xm" as root

PATCH New aq 1 participant 1 message May 18, 2005

lore
Share & tools
lore

aq

author
#0 lore raw

PATCH 1/1 warning when not running "xm" as root

hello,

Currently -unstable requires user must be root to run xm. But the error spit out is not clear enough, or even misleaded ("Error: Error connecting to xend, is xend running?")

This patch checks to see if the user is root, and warns if not (patched against cset 1.1440)

===== tools/python/xen/xm/main.py 1.52 vs edited =====

tools/python/xen/xm/main.py 2005-05-18 12:30:51 +09:00 renamed from tools/python/xen/xm/main.py 2005-05-13 00:04:56 +09:00 +2 -0
@@ -129,6 +129,8 @@
         sys.exit(1)
 
     def main(self, args):
+        if os.geteuid() != 0:
+            self.err("xm must be run as root.")
         try:
             self.main_call(args)
         except socket.error, ex: