Skip to content

Conversation

@5umm3r15
Copy link
Contributor

New SELinux policy for libvirt drivers:
Hypervisor drivers:

  • virtqemud (QEMU/KVM)
  • virtlxcd (LXC)
  • virtvboxd (VirtualBox)

Secondary drivers:

  • virtstoraged (host storage mgmt)
  • virtnetworkd (virtual network mgmt)
  • virtinterface (network interface mgmt)
  • virtnodedevd (physical device mgmt)
  • virtsecretd (security credential mgmt)
  • virtnwfilterd (ip[6]tables/ebtables mgmt)
  • virtproxyd (proxy daemon)

SELinux policy for virtvxz and virtxend has not been created yet.

@5umm3r15
Copy link
Contributor Author

Hi @wrabcak @zpytela
can you please review it?
It is a design of selinux policy for virt drivers.
SELinux policy for virtvxz and virtxend has not been created yet.
Interfaces are still not solved yet.

virt.te Outdated
virt_driver_template(virtnetworkd)

type virtnetworkd_var_run_t;
files_pid_file(virtnetworkd_var_run_t)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can put declaration of *_var_run_t type to the virt_driver_template() same as you did with process domains.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok, I will do it

virt.te Outdated
#virtxend
type virtxend_t;
type virtxend_exec_t;
init_daemon_domain(virtxend_t, virtxend_exec_t)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why virt_driver_template is not used here? Is it for purpose?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I skipped policy for virtxend driver for now.

virt.te Outdated
allow virtnwfilterd_t self:rawip_socket create_socket_perms;

allow virtnwfilterd_t virt_var_run_t:dir { create search_dir_perms };
manage_dirs_pattern(virtnwfilterd_t, virtnwfilterd_var_run_t, virtnwfilterd_var_run_t)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These set of rules could be part of virt_driver_template

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok, thanks

@5umm3r15 5umm3r15 marked this pull request as draft July 31, 2020 08:44
@5umm3r15 5umm3r15 force-pushed the libvirt-selinux branch 2 times, most recently from 2cce9c3 to c1a4d43 Compare September 1, 2020 09:50
@5umm3r15 5umm3r15 force-pushed the libvirt-selinux branch 2 times, most recently from 1bf7799 to 0fa96eb Compare September 14, 2020 19:39
@5umm3r15 5umm3r15 force-pushed the libvirt-selinux branch 3 times, most recently from df9ce09 to 63b2ad8 Compare November 12, 2020 12:36
@5umm3r15 5umm3r15 force-pushed the libvirt-selinux branch 2 times, most recently from 1b9d89f to 54730f7 Compare November 19, 2020 12:11
New SELinux policy for libvirt drivers:
Hypervisor drivers:
 - virtqemud  (QEMU/KVM)
 - virtlxcd   (LXC)
 - virtvboxd  (VirtualBox)

Secondary drivers:
 - virtstoraged   (host storage mgmt)
 - virtnetworkd   (virtual network mgmt)
 - virtinterface  (network interface mgmt)
 - virtnodedevd   (physical device mgmt)
 - virtsecretd    (security credential mgmt)
 - virtnwfilterd  (ip[6]tables/ebtables mgmt)
 - virtproxyd     (proxy daemon)

SELinux policy for virtvxz and virtxend has not been created yet.
Separate the services from the original virt files that are not libvirt related and create virt_supplementary policy module.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants