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-users

Re: [Xen-users] Programatically checking if we're in a domU or dom0

To: xen-users@xxxxxxxxxxxxxxxxxxx
Subject: Re: [Xen-users] Programatically checking if we're in a domU or dom0
From: Lutrin Jean <jeanlutrin@xxxxxxxx>
Date: Wed, 4 Oct 2006 15:51:37 +0200 (CEST)
Delivery-date: Wed, 04 Oct 2006 06:53:24 -0700
Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.fr; h=Message-ID:Received:Date:From:Subject:To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=ZHsLLs/fFQZKur4k8HDQDp6wZsrgFUxiU9V2JJ/szPvAmz+xFWYMPLxEpLS+E7/lJn6NoUMLCgSo2TsvkHF5aWh9pfx6DiImf/Htzs9WITlc8nEgGgTIjaFq8gEVceDgDuPCjMxgQjjdo5pWBdpOcYIBlT8rIMaWB796k06f/VQ= ;
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-users-request@lists.xensource.com?subject=help>
List-id: Xen user discussion <xen-users.lists.xensource.com>
List-post: <mailto:xen-users@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-users-bounces@xxxxxxxxxxxxxxxxxxx
> Personally, I use the following command in a
> startup script to check if we're in a privileged
> domain:
>
> grep -qsE '^control_d$' /proc/xen/capabilities

Hi Andrew,

thanks for your tip.

Now I can easily determine wether I'm running
on a modified kernel or not (by checking for
the presence of /proc/xen).

However, once I've found that, I'd like to know
if I'm on a priviledged domain or not.

Sadly my /proc/xen/capabilities is only readable
by root.

What would be a clean way to check for this from
a normal user account?




        

        
                
___________________________________________________________________________ 
Yahoo! Mail réinvente le mail ! Découvrez le nouveau Yahoo! Mail et son 
interface révolutionnaire.
http://fr.mail.yahoo.com

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

<Prev in Thread] Current Thread [Next in Thread>