From mboxrd@z Thu Jan 1 00:00:00 1970 From: aq Subject: [PATCH] warning when not running "xm" as root Date: Tue, 17 May 2005 20:42:08 -0700 Message-ID: <9cde8bff050517204268223830@mail.gmail.com> Reply-To: aq Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Return-path: Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel List-Id: xen-devel@lists.xenproject.org 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 =3D=3D=3D=3D=3D tools/python/xen/xm/main.py 1.52 vs edited =3D=3D=3D=3D=3D --- 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) =20 def main(self, args): + if os.geteuid() !=3D 0: + self.err("xm must be run as root.") try: self.main_call(args) except socket.error, ex: