From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Bryan D. Payne" Subject: [PATCH][ACM] python tools and support for resource labeling Date: Mon, 26 Jun 2006 18:14:15 -0400 Message-ID: <44A05C37.1000407@us.ibm.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------090005010508070501060206" Return-path: 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@lists.xensource.com Cc: sailer@us.ibm.com, bdpayne@us.ibm.com List-Id: xen-devel@lists.xenproject.org This is a multi-part message in MIME format. --------------090005010508070501060206 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit This patch adds new xm subcommands to support working with resource labels. The new subcommands are 'xm resources', 'xm rmlabel', 'xm getlabel' and 'xm dry-run'. In addition, the 'xm addlabel' subcommand now uses an updated syntax to support labeling both domains and resources. See the xm man page for details on each subcommand. Beyond the new subcommands, this patch allows users to immediately see when security checks will fail by pushing some basic security checking into the beginning of 'xm create' and 'xm block-attach'. ACM security attributes for block devices are added to XenStore in order to support the final security enforcement, which will be performed in the kernel and included in a separate patch. Signed-off-by: Bryan D. Payne Signed-off-by: Reiner Sailer --------------090005010508070501060206 Content-Type: text/x-patch; name="shype-reslabel-enforce-python-14.diff" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="shype-reslabel-enforce-python-14.diff" --- docs/man/xm.pod.1 | 93 ++++++++++++++++++-- tools/python/xen/util/security.py | 99 ++++++++++++++++++++++ tools/python/xen/xend/server/blkif.py | 12 ++ tools/python/xen/xm/addlabel.py | 153 +++++++++++++++++++++++++++------- tools/python/xen/xm/create.py | 59 ++++++++++++- tools/python/xen/xm/dry-run.py | 95 +++++++++++++++++++++ tools/python/xen/xm/getlabel.py | 134 +++++++++++++++++++++++++++++ tools/python/xen/xm/main.py | 28 ++++++ tools/python/xen/xm/resources.py | 70 +++++++++++++++ tools/python/xen/xm/rmlabel.py | 134 +++++++++++++++++++++++++++++ 10 files changed, 834 insertions(+), 43 deletions(-) Index: xen-unstable.hg-shype/docs/man/xm.pod.1 =================================================================== --- xen-unstable.hg-shype.orig/docs/man/xm.pod.1 +++ xen-unstable.hg-shype/docs/man/xm.pod.1 @@ -875,14 +875,43 @@ defined in the I. Unless specifi the currently enforced access control policy. The default for I is 'dom'. The labels are arranged in alphabetical order. -=item B I I