Skip to contentSkip to conversation

virt: Add policy for virtlockd the Virtual machine lock manager

PATCH Superseded Jason Zaman 1 participant 2 messages Sep 5, 2015

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 virt: Add policy for virtlockd the Virtual machine lock manager

---
 virt.fc |  4 ++++
 virt.te | 59 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 63 insertions(+)
virt.fc +4 -0
index b38007b..7bc2d3c 100644
@@ -27,6 +27,7 @@ HOME_DIR/VirtualMachines/isos(/.*)?	gen_context(system_u:object_r:virt_content_t
 /usr/sbin/fence_virtd	--	gen_context(system_u:object_r:virsh_exec_t,s0)
 /usr/sbin/libvirt-qmf	--	gen_context(system_u:object_r:virt_qmf_exec_t,s0)
 /usr/sbin/libvirtd	--	gen_context(system_u:object_r:virtd_exec_t,s0)
+/usr/sbin/virtlockd	--	gen_context(system_u:object_r:virtlockd_exec_t,s0)
 
 /var/cache/libvirt(/.*)?	gen_context(system_u:object_r:virt_cache_t,s0-mls_systemhigh)
 
@@ -35,6 +36,7 @@ HOME_DIR/VirtualMachines/isos(/.*)?	gen_context(system_u:object_r:virt_content_t
 /var/lib/libvirt/images(/.*)?	gen_context(system_u:object_r:virt_image_t,s0)
 /var/lib/libvirt/isos(/.*)?	gen_context(system_u:object_r:virt_content_t,s0)
 /var/lib/libvirt/qemu(/.*)?	gen_context(system_u:object_r:svirt_var_run_t,s0-mls_systemhigh)
+/var/lib/libvirt/lockd(/.*)?	gen_context(system_u:object_r:virtlockd_var_lib_t,s0)
 
 /var/log/log(/.*)?	gen_context(system_u:object_r:virt_log_t,s0)
 /var/log/libvirt(/.*)?	gen_context(system_u:object_r:virt_log_t,s0)
@@ -48,5 +50,7 @@ HOME_DIR/VirtualMachines/isos(/.*)?	gen_context(system_u:object_r:virt_content_t
 /var/run/libvirt/lxc(/.*)?	gen_context(system_u:object_r:virtd_lxc_var_run_t,s0)
 /var/run/libvirt-sandbox(/.*)?	gen_context(system_u:object_r:virtd_lxc_var_run_t,s0)
 /var/run/libvirt/qemu(/.*)?	gen_context(system_u:object_r:svirt_var_run_t,s0-mls_systemhigh)
+/var/run/libvirt/virtlockd-sock	gen_context(system_u:object_r:virtlockd_run_t,s0)
 /var/run/user/[^/]*/libguestfs(/.*)?	gen_context(system_u:object_r:virt_home_t,s0)
 /var/run/vdsm(/.*)?	gen_context(system_u:object_r:virt_var_run_t,s0)
+/var/run/virtlockd.pid		gen_context(system_u:object_r:virtlockd_run_t,s0)
virt.te +59 -0

80 lines not on this page · raw message

Signature · 1 line
2.4.6
#1 lore raw

PATCH 2/2 virt: Allow creating qemu guest agent socket

This is needed for the host side guest agent socket for qemu.

type=AVC msg=audit(1441210375.086:110241): avc: denied { create } for pid=25153 comm="libvirtd" scontext=system_u:system_r:virtd_t:s0-s0:c0.c1023 tcontext=system_u:system_r:svirt_t:s0:c110,c185 tclass=unix_stream_socket permissive=0

---
 virt.te | 1 +
 1 file changed, 1 insertion(+)
virt.te +1 -0
index c6ec8bc..6187ef1 100644
@@ -451,6 +451,7 @@ allow virtd_t self:netlink_kobject_uevent_socket create_socket_perms;
 allow virtd_t self:netlink_route_socket nlmsg_write;
 
 allow virtd_t virt_domain:process { getattr getsched setsched transition signal signull sigkill };
+allow virtd_t virt_domain:unix_stream_socket create_stream_socket_perms;
 dontaudit virtd_t virt_domain:process { siginh noatsecure rlimitinh };
 
 allow virtd_t svirt_lxc_domain:unix_stream_socket { create_stream_socket_perms connectto };
Signature · 1 line
2.4.6