|
Dan Walsh |
b4b026 |
diff -up serefpolicy-3.10.0/policy/modules/apps/qemu.te.qemu serefpolicy-3.10.0/policy/modules/apps/qemu.te
|
|
Dan Walsh |
8872d3 |
--- serefpolicy-3.10.0/policy/modules/apps/qemu.te.qemu 2011-11-04 13:28:26.200380523 -0400
|
|
Dan Walsh |
8872d3 |
+++ serefpolicy-3.10.0/policy/modules/apps/qemu.te 2011-11-04 13:28:27.042380389 -0400
|
|
Dan Walsh |
b4b026 |
@@ -40,9 +40,7 @@ gen_tunable(qemu_use_nfs, true)
|
|
Dan Walsh |
b4b026 |
## </desc>
|
|
Dan Walsh |
b4b026 |
gen_tunable(qemu_use_usb, true)
|
|
Dan Walsh |
b4b026 |
|
|
Dan Walsh |
b4b026 |
-type qemu_exec_t;
|
|
Dan Walsh |
b4b026 |
virt_domain_template(qemu)
|
|
Dan Walsh |
b4b026 |
-application_domain(qemu_t, qemu_exec_t)
|
|
Dan Walsh |
b4b026 |
role system_r types qemu_t;
|
|
Dan Walsh |
b4b026 |
|
|
Dan Walsh |
b4b026 |
########################################
|
|
Dan Walsh |
b4b026 |
diff -up serefpolicy-3.10.0/policy/modules/services/virt.if.qemu serefpolicy-3.10.0/policy/modules/services/virt.if
|
|
Dan Walsh |
8872d3 |
--- serefpolicy-3.10.0/policy/modules/services/virt.if.qemu 2011-11-04 13:28:27.013380393 -0400
|
|
Dan Walsh |
8872d3 |
+++ serefpolicy-3.10.0/policy/modules/services/virt.if 2011-11-04 13:28:27.044380389 -0400
|
|
Dan Walsh |
b4b026 |
@@ -16,10 +16,11 @@ template(`virt_domain_template',`
|
|
Dan Walsh |
b4b026 |
attribute virt_image_type, virt_domain;
|
|
Dan Walsh |
b4b026 |
attribute virt_tmpfs_type;
|
|
Dan Walsh |
b4b026 |
attribute virt_ptynode;
|
|
Dan Walsh |
b4b026 |
+ type qemu_exec_t;
|
|
Dan Walsh |
b4b026 |
')
|
|
Dan Walsh |
b4b026 |
|
|
Dan Walsh |
b4b026 |
type $1_t, virt_domain;
|
|
Dan Walsh |
b4b026 |
- domain_type($1_t)
|
|
Dan Walsh |
b4b026 |
+ application_domain($1_t, qemu_exec_t)
|
|
Dan Walsh |
b4b026 |
domain_user_exemption_target($1_t)
|
|
Dan Walsh |
b4b026 |
mls_rangetrans_target($1_t)
|
|
Dan Walsh |
b4b026 |
mcs_untrusted_proc($1_t)
|
|
Dan Walsh |
b4b026 |
@@ -848,3 +849,21 @@ template(`virt_lxc_domain_template',`
|
|
Dan Walsh |
b4b026 |
role system_r types $1_t;
|
|
Dan Walsh |
b4b026 |
')
|
|
Dan Walsh |
b4b026 |
|
|
Dan Walsh |
b4b026 |
+########################################
|
|
Dan Walsh |
b4b026 |
+## <summary>
|
|
Dan Walsh |
b4b026 |
+## Execute a qemu_exec_t in the callers domain
|
|
Dan Walsh |
b4b026 |
+## </summary>
|
|
Dan Walsh |
b4b026 |
+## <param name="domain">
|
|
Dan Walsh |
b4b026 |
+## <summary>
|
|
Dan Walsh |
b4b026 |
+## Domain allowed access.
|
|
Dan Walsh |
b4b026 |
+## </summary>
|
|
Dan Walsh |
b4b026 |
+## </param>
|
|
Dan Walsh |
b4b026 |
+#
|
|
Dan Walsh |
b4b026 |
+interface(`virt_exec_qemu',`
|
|
Dan Walsh |
b4b026 |
+ gen_require(`
|
|
Dan Walsh |
b4b026 |
+ type qemu_exec_t;
|
|
Dan Walsh |
b4b026 |
+ ')
|
|
Dan Walsh |
b4b026 |
+
|
|
Dan Walsh |
b4b026 |
+ can_exec($1, qemu_exec_t)
|
|
Dan Walsh |
b4b026 |
+')
|
|
Dan Walsh |
b4b026 |
+
|
|
Dan Walsh |
b4b026 |
diff -up serefpolicy-3.10.0/policy/modules/services/virt.te.qemu serefpolicy-3.10.0/policy/modules/services/virt.te
|
|
Dan Walsh |
8872d3 |
--- serefpolicy-3.10.0/policy/modules/services/virt.te.qemu 2011-11-04 13:28:27.015380393 -0400
|
|
Dan Walsh |
8872d3 |
+++ serefpolicy-3.10.0/policy/modules/services/virt.te 2011-11-04 13:30:30.832359916 -0400
|
|
Dan Walsh |
26536c |
@@ -73,11 +73,14 @@ gen_tunable(virt_use_usb, true)
|
|
Dan Walsh |
26536c |
|
|
Dan Walsh |
26536c |
virt_domain_template(svirt)
|
|
Dan Walsh |
26536c |
role system_r types svirt_t;
|
|
Dan Walsh |
26536c |
+typealias svirt_t alias qemu_t;
|
|
Dan Walsh |
26536c |
|
|
Dan Walsh |
26536c |
attribute virt_domain;
|
|
Dan Walsh |
b4b026 |
attribute virt_image_type;
|
|
Dan Walsh |
b4b026 |
attribute virt_tmpfs_type;
|
|
Dan Walsh |
b4b026 |
|
|
Dan Walsh |
b4b026 |
+type qemu_exec_t;
|
|
Dan Walsh |
b4b026 |
+
|
|
Dan Walsh |
b4b026 |
type virt_cache_t alias svirt_cache_t;
|
|
Dan Walsh |
b4b026 |
files_type(virt_cache_t)
|
|
Dan Walsh |
b4b026 |
|
|
Dan Walsh |
8872d3 |
@@ -275,6 +278,9 @@ allow virtd_t virt_domain:process { geta
|
|
Dan Walsh |
b4b026 |
allow virt_domain virtd_t:fd use;
|
|
Dan Walsh |
b4b026 |
dontaudit virt_domain virtd_t:unix_stream_socket { read write };
|
|
Dan Walsh |
b4b026 |
|
|
Dan Walsh |
8f22f8 |
+can_exec(virtd_t, qemu_exec_t)
|
|
Dan Walsh |
b4b026 |
+can_exec(virt_domain, qemu_exec_t)
|
|
Dan Walsh |
b4b026 |
+
|
|
Dan Walsh |
b4b026 |
allow virtd_t qemu_var_run_t:file relabel_file_perms;
|
|
Dan Walsh |
b4b026 |
manage_dirs_pattern(virtd_t, qemu_var_run_t, qemu_var_run_t)
|
|
Dan Walsh |
b4b026 |
manage_files_pattern(virtd_t, qemu_var_run_t, qemu_var_run_t)
|
|
Dan Walsh |
8872d3 |
@@ -643,11 +649,6 @@ optional_policy(`
|
|
Dan Walsh |
b4b026 |
')
|
|
Dan Walsh |
b4b026 |
|
|
Dan Walsh |
b4b026 |
optional_policy(`
|
|
Dan Walsh |
8872d3 |
- qemu_entry_type(virt_domain)
|
|
Dan Walsh |
8872d3 |
- qemu_exec(virt_domain)
|
|
Dan Walsh |
b4b026 |
-')
|
|
Dan Walsh |
b4b026 |
-
|
|
Dan Walsh |
b4b026 |
-optional_policy(`
|
|
Dan Walsh |
8872d3 |
virt_read_config(virt_domain)
|
|
Dan Walsh |
8872d3 |
virt_read_lib_files(virt_domain)
|
|
Dan Walsh |
8872d3 |
virt_read_content(virt_domain)
|