chore(deck): Polkit cleanup

This commit is contained in:
Kyle Gospodnetich 2023-07-24 22:08:49 -07:00
parent 4b5ee05c44
commit 2e05a948c7
2 changed files with 14 additions and 11 deletions

View File

@ -1,10 +1,6 @@
/* Allow members of the wheel group to execute the defined actions
* without password authentication, similar to "sudo NOPASSWD:"
*/
polkit.addRule(function(action, subject) {
if ((action.id == "org.bazzite.dmidecode.pkexec") &&
subject.isInGroup("wheel"))
{
if ((action.id == "org.bazzite.dmidecode.pkexec" &&
subject.isInGroup("wheel")) {
return polkit.Result.YES;
}
});
});

View File

@ -1,14 +1,21 @@
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE policyconfig PUBLIC
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE policyconfig PUBLIC
"-//freedesktop//DTD PolicyKit Policy Configuration 1.0//EN"
"http://www.freedesktop.org/standards/PolicyKit/1/policyconfig.dtd">
<policyconfig>
<vendor>Bazzite</vendor>
<vendor_url>https://github.com/ublue-os/bazzite/</vendor_url>
<action id="org.bazzite.dmidecode.pkexec">
<message>Authentication is required to dump SMBIOS table contents</message>
<description>Dump SMBIOS table contents</description>
<icon_name>package-x-generic</icon_name>
<defaults>
<allow_any>no</allow_any>
<allow_inactive>no</allow_inactive>
<allow_any>yes</allow_any>
<allow_inactive>yes</allow_inactive>
<allow_active>yes</allow_active>
</defaults>
<annotate key="org.freedesktop.policykit.exec.path">/usr/sbin/dmidecode</annotate>
</action>
</policyconfig>