libvirt group: gate on daemon/virt-manager, not the metapkg #5
+7
-1
@@ -129,7 +129,13 @@ UNIT
|
||||
# libvirt group: members manage qemu:///system without a polkit prompt.
|
||||
# Without this, virt-manager dies on "access denied by policy" even with
|
||||
# a working agent (VM-proven). Idempotent; applies after re-login.
|
||||
if pkg_installed libvirt; then
|
||||
#
|
||||
# Gate on the DAEMON, not the 'libvirt' metapkg name: virt-manager only
|
||||
# requires libvirt-glib client-side, so on a fresh VM libvirt can be
|
||||
# functionally present via libvirt-daemon* without rpm -q libvirt passing
|
||||
# (VM-proven: user stuck in yuri+wheel with virt-manager installed).
|
||||
if pkg_installed libvirt libvirt-daemon libvirt-daemon-driver-qemu virt-manager \
|
||||
|| [[ -x /usr/sbin/libvirtd ]]; then
|
||||
local real_user="${SUDO_USER:-$USER}"
|
||||
if ! id -nG "$real_user" 2>/dev/null | grep -qw libvirt; then
|
||||
info "Adding $real_user to the libvirt group (re-login to apply)..."
|
||||
|
||||
Reference in New Issue
Block a user