Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 671802

Summary: app-emulation/libvirt non-root virsh is broken with sys-auth/polkit-0.115
Product: Gentoo Linux Reporter: aporilel
Component: Current packagesAssignee: Matthias Maier <tamiko>
Status: RESOLVED INVALID    
Severity: normal CC: virtualization
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
See Also: https://bugs.gentoo.org/show_bug.cgi?id=661470
Whiteboard:
Package list:
Runtime testing required: ---

Description aporilel 2018-11-24 11:23:35 UTC
$ LC_ALL=C virsh list
error: failed to connect to the hypervisor
error: ошибка службы: CheckAuthorization: Failed to open file “/proc/4210/status”: No such file or directory

My polkit rule in /etc/polkit-1/rules.d/:

polkit.addRule(function(action, subject) {
    if (action.id == "org.libvirt.unix.manage" && subject.user == "myusername") {
            return polkit.Result.YES;
    }
});
Comment 1 Matthias Maier gentoo-dev 2018-12-26 02:41:57 UTC
I cannot reproduce, the following rule works fine for me:

polkit.addRule(function(action, subject) { 
  if (action.id == "org.libvirt.unix.manage" && 
      subject.isInGroup("myusergroup")) {
    return polkit.Result.YES; 
  } 
});
Comment 2 Matthias Maier gentoo-dev 2018-12-26 02:42:28 UTC
Please reopen if the problem persists and is not a configuration problem.