>From da1fc98ac230329a132de02f8019c0f024374459 Mon Sep 17 00:00:00 2001 From: Richard Jones Date: Wed, 12 Aug 2009 17:40:22 +0100 Subject: [PATCH 1/2] Add documentation for SELinux configuration. --- guestfs.pod | 38 ++++++++++++++++++++++++++++++++++++++ 1 files changed, 38 insertions(+), 0 deletions(-) diff --git a/guestfs.pod b/guestfs.pod index 4d462f3..bc16ecb 100644 --- a/guestfs.pod +++ b/guestfs.pod @@ -316,6 +316,11 @@ Only supports Linux guests (not Windows, BSD, etc). Architecture limitations (eg. won't work for a PPC guest on an X86 host). +=item * + +For SELinux guests, you may need to enable SELinux and load policy +first. See I in this manpage. + =back The two main API calls to run commands are C and @@ -337,6 +342,39 @@ directory, plus additional information about each one. C can be used to recursively list files. +=head2 SELINUX + +We support SELinux guests. To ensure that labeling happens correctly +in SELinux guests, you need to enable SELinux and load the guest's +policy: + +=over 4 + +=item 1. + +Before launching, do: + + guestfs_set_selinux (g, 1); + +=item 2. + +After mounting the guest's filesystem(s), load the policy. This +is best done by running the L command in the +guest itself: + + guestfs_sh (g, "/usr/sbin/load_policy"); + +(Older versions of C require you to specify the +name of the policy file). + +=back + +This will work for running commands and editing existing files. + +When new files are created, you may need to label them explicitly, +for example by running the external command +C. + =head1 HIGH-LEVEL API ACTIONS =head2 ABI GUARANTEE -- 1.6.2.5