I just saw the polkit reference page for libvirt and created the following rule
//content of /etc/polkit-1/rules.d/50-libvirt.rules
polkit.addRule(function(action, subject) {
if (action.id == "org.libvirt.api.domain.getattr" &&
subject.user == "dravigon") {
if (action.lookup("connect_driver") == 'QEMU' &&
action.lookup("domain_name") == 'debian8') {
return polkit.Result.YES;
} else {
return polkit.Result.NO;
}
}
});
in hopes of limiting the user dravigon only to access the domain debian8 from qemu/kvm driver
but it is not working at all can anyone say where i went wrong
Just followed the instrucions in fedora polkit page and found he answer
i must add another block it seems only the second block is useless without the first one
REFERENCE:https://fedoraproject.org/wiki/QA:Testcase_Virt_ACLs