Hello,

I'm puzzled by how libvirtd manages access control.

As far as I can tell, on my Fedora system it runs qemu and virtiofsd instances 
as user *qemu*. Yet, the qemu process apparently has read/write access to 
storage devices in /dev that only root has rw access for. Similarly, virtiofsd 
is able to write into shared directories that the qemu user does not have 
access to (confirmed by switching to qemu user with sudo).

What is libvirtd (or virt-manager) doing to make this work?

Then, as far as I can tell, there's lots of sockets with different permissions 
created by systemd in /run/libvirt (e.g. libvirt-admin-sock, libvirt-sock, 
libvirt-sock-ro). But since they're all passed to libvirtd as open file 
descriptors, I don't understand how they can give different levels of access 
(since libvirtd has no way of knowing which socket was used).

What am I missing?

Best,
-Nikolaus

Reply via email to