From: sven.vermeulen@siphos.be (Sven Vermeulen)
To: refpolicy@oss.tresys.com
Subject: [refpolicy] [PATCH 1/4] Adding default context rules for libvirt
Date: Wed, 11 Apr 2012 20:34:53 +0200 [thread overview]
Message-ID: <20120411183453.GB6229@siphos.be> (raw)
In-Reply-To: <20120411183017.GA6229@siphos.be>
The libvirt infrastructure requires the availability of the context files.
In this patch, we add the defaults to the three predefined application
contexts (mls/mcs/standard).
Signed-off-by: Sven Vermeulen <sven.vermeulen@siphos.be>
---
Makefile | 2 +-
config/appconfig-mcs/virtual_domain_context | 1 +
config/appconfig-mcs/virtual_image_context | 2 ++
config/appconfig-mls/virtual_domain_context | 1 +
config/appconfig-mls/virtual_image_context | 2 ++
config/appconfig-standard/virtual_domain_context | 1 +
config/appconfig-standard/virtual_image_context | 2 ++
7 files changed, 10 insertions(+), 1 deletions(-)
create mode 100644 config/appconfig-mcs/virtual_domain_context
create mode 100644 config/appconfig-mcs/virtual_image_context
create mode 100644 config/appconfig-mls/virtual_domain_context
create mode 100644 config/appconfig-mls/virtual_image_context
create mode 100644 config/appconfig-standard/virtual_domain_context
create mode 100644 config/appconfig-standard/virtual_image_context
diff --git a/Makefile b/Makefile
index 5a43919..39a3d40 100644
--- a/Makefile
+++ b/Makefile
@@ -249,7 +249,7 @@ seusers := $(appconf)/seusers
appdir := $(contextpath)
user_default_contexts := $(wildcard config/appconfig-$(TYPE)/*_default_contexts)
user_default_contexts_names := $(addprefix $(contextpath)/users/,$(subst _default_contexts,,$(notdir $(user_default_contexts))))
-appfiles := $(addprefix $(appdir)/,default_contexts default_type initrc_context failsafe_context userhelper_context removable_context dbus_contexts sepgsql_contexts x_contexts customizable_types securetty_types) $(contextpath)/files/media $(fcsubspath) $(user_default_contexts_names)
+appfiles := $(addprefix $(appdir)/,default_contexts default_type initrc_context failsafe_context userhelper_context removable_context dbus_contexts sepgsql_contexts x_contexts customizable_types securetty_types virtual_domain_context virtual_image_context) $(contextpath)/files/media $(fcsubspath) $(user_default_contexts_names)
net_contexts := $(builddir)net_contexts
all_layers := $(shell find $(wildcard $(moddir)/*) -maxdepth 0 -type d)
diff --git a/config/appconfig-mcs/virtual_domain_context b/config/appconfig-mcs/virtual_domain_context
new file mode 100644
index 0000000..d387b42
--- /dev/null
+++ b/config/appconfig-mcs/virtual_domain_context
@@ -0,0 +1 @@
+system_u:system_r:svirt_t:s0
diff --git a/config/appconfig-mcs/virtual_image_context b/config/appconfig-mcs/virtual_image_context
new file mode 100644
index 0000000..8ab1e27
--- /dev/null
+++ b/config/appconfig-mcs/virtual_image_context
@@ -0,0 +1,2 @@
+system_u:object_r:svirt_image_t:s0
+system_u:object_r:virt_content_t:s0
diff --git a/config/appconfig-mls/virtual_domain_context b/config/appconfig-mls/virtual_domain_context
new file mode 100644
index 0000000..d387b42
--- /dev/null
+++ b/config/appconfig-mls/virtual_domain_context
@@ -0,0 +1 @@
+system_u:system_r:svirt_t:s0
diff --git a/config/appconfig-mls/virtual_image_context b/config/appconfig-mls/virtual_image_context
new file mode 100644
index 0000000..8ab1e27
--- /dev/null
+++ b/config/appconfig-mls/virtual_image_context
@@ -0,0 +1,2 @@
+system_u:object_r:svirt_image_t:s0
+system_u:object_r:virt_content_t:s0
diff --git a/config/appconfig-standard/virtual_domain_context b/config/appconfig-standard/virtual_domain_context
new file mode 100644
index 0000000..c049e10
--- /dev/null
+++ b/config/appconfig-standard/virtual_domain_context
@@ -0,0 +1 @@
+system_u:system_r:svirt_t
diff --git a/config/appconfig-standard/virtual_image_context b/config/appconfig-standard/virtual_image_context
new file mode 100644
index 0000000..fca6046
--- /dev/null
+++ b/config/appconfig-standard/virtual_image_context
@@ -0,0 +1,2 @@
+system_u:object_r:svirt_image_t
+system_u:object_r:virt_content_t
--
1.7.3.4
next prev parent reply other threads:[~2012-04-11 18:34 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-11 18:30 [refpolicy] [PATCH 0/4] Updates related to libvirt Sven Vermeulen
2012-04-11 18:34 ` Sven Vermeulen [this message]
2012-04-23 14:40 ` [refpolicy] [PATCH 1/4] Adding default context rules for libvirt Christopher J. PeBenito
2012-04-11 18:35 ` [refpolicy] [PATCH 2/4] Let libvirt write its own tmp files (and execute them) Sven Vermeulen
2012-04-23 14:41 ` Christopher J. PeBenito
2012-04-11 18:35 ` [refpolicy] [PATCH 3/4] Calling virsh requires stream_connect rights towards virt Sven Vermeulen
2012-04-23 14:41 ` Christopher J. PeBenito
2012-04-11 18:36 ` [refpolicy] [PATCH 4/4] libvirt use of qemu requires re-exec of qemu Sven Vermeulen
2012-04-23 14:41 ` Christopher J. PeBenito
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20120411183453.GB6229@siphos.be \
--to=sven.vermeulen@siphos.be \
--cc=refpolicy@oss.tresys.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.