[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH] warning when not running "xm" as root


  • To: xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxx>
  • From: aq <aquynh@xxxxxxxxx>
  • Date: Tue, 17 May 2005 20:42:08 -0700
  • Delivery-date: Wed, 18 May 2005 03:41:36 +0000
  • Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=Em9S6ela2RApzq9DpUkZKuNBOfHupshK0UOSiQ4aQJMM4kqpIsvVXC571dPmIeeWU0atRmBkPdj7I5WyOweoE4quSwa4MNv3pxf+qdr+ylZ2FXu8VgdBT1+5agfRDyXI2rGiiTRs/cFZgdmuidDdOTBlFwvYFbL4Mgx3hxJF/KQ=
  • List-id: Xen developer discussion <xen-devel.lists.xensource.com>

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)

Signed-off-by: Nguyen Anh Quynh <aquynh@xxxxxxxxx>

===== tools/python/xen/xm/main.py 1.52 vs edited =====
--- 1.52/tools/python/xen/xm/main.py    2005-05-13 00:04:56 +09:00
+++ edited/tools/python/xen/xm/main.py  2005-05-18 12:30:51 +09:00
@@ -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:

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.