WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

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

To: "aq" <aquynh@xxxxxxxxx>, "xen-devel" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: RE: [Xen-devel] [PATCH] warning when not running "xm" as root
From: "Ian Pratt" <m+Ian.Pratt@xxxxxxxxxxxx>
Date: Wed, 18 May 2005 08:11:16 +0100
Delivery-date: Wed, 18 May 2005 07:10:48 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AcVbW6I2jMSZg6/ERwSW/B4k1otfQAAHMuqA
Thread-topic: [Xen-devel] [PATCH] warning when not running "xm" as root
> 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)

Thanks. I'd appreciate it if you could knock up a patch that enables the
user/group of the unix domain socket used for xm-xend communication to
be set in xend-config.sxp, defaulting to root/root. It would be great if
you could update the error message accordingly.

Thanks,
Ian
 
> 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
> 

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