From: Olaf Hering Subject: [PATCH 1/5] tools/hotplug: move XENSTORED_MOUNT_CTX to sysconfig.xencommons Date: Fri, 5 Dec 2014 13:05:48 +0100 Message-ID: <1417781152-9926-2-git-send-email-olaf@aepfle.de> References: <1417781152-9926-1-git-send-email-olaf@aepfle.de> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1417781152-9926-1-git-send-email-olaf@aepfle.de> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: xen-devel@lists.xen.org Cc: Olaf Hering , Wei Liu , Ian Campbell , Stefano Stabellini , Ian Jackson List-Id: xen-devel@lists.xenproject.org On a non-SELinux system the mount option "context=none" works fine. But with SELinux enabled a proper value has to be defined. To simplify the required adjustment move XENSTORED_MOUNT_CTX from the service file to the sysconfig file. There is no need to require the creation of a new sysconfig file, just reuse the existing /etc/sysconfig/xencommons file. Signed-off-by: Olaf Hering Cc: Ian Jackson Cc: Stefano Stabellini Cc: Ian Campbell Cc: Wei Liu --- tools/hotplug/Linux/init.d/sysconfig.xencommons.in | 7 +++++++ tools/hotplug/Linux/systemd/var-lib-xenstored.mount.in | 3 +-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/tools/hotplug/Linux/init.d/sysconfig.xencommons.in b/tools/hotplug/Linux/init.d/sysconfig.xencommons.in index c12fc8a..3a34b33 100644 --- a/tools/hotplug/Linux/init.d/sysconfig.xencommons.in +++ b/tools/hotplug/Linux/init.d/sysconfig.xencommons.in @@ -40,3 +40,10 @@ # qemu path #QEMU_XEN=@LIBEXEC_BIN@/qemu-system-i386 + +## Type: string +## Default: "none" +# +# SELinux context for @XEN_LIB_STORED@ mount point. +# see mount(8) for the meaning of the "context=" option +XENSTORED_MOUNT_CTX=none diff --git a/tools/hotplug/Linux/systemd/var-lib-xenstored.mount.in b/tools/hotplug/Linux/systemd/var-lib-xenstored.mount.in index d5e04db..65e0b79 100644 --- a/tools/hotplug/Linux/systemd/var-lib-xenstored.mount.in +++ b/tools/hotplug/Linux/systemd/var-lib-xenstored.mount.in @@ -6,8 +6,7 @@ ConditionPathExists=/proc/xen/capabilities RefuseManualStop=true [Mount] -Environment=XENSTORED_MOUNT_CTX=none -EnvironmentFile=-@CONFIG_DIR@/@CONFIG_LEAF_DIR@/xenstored +EnvironmentFile=@CONFIG_DIR@/@CONFIG_LEAF_DIR@/xencommons What=xenstore Where=@XEN_LIB_STORED@ Type=tmpfs