0
Daję zawartość
Kod:
/usr/share/polkit-1/actions/org.blueman.policy
<?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>
<action id="org.bleachbit">
<message>Authentication is required to run Bleachbit</message>
<icon_name>bleachbit</icon_name>
<defaults>
<allow_any>auth_admin</allow_any>
<allow_inactive>auth_admin</allow_inactive>
<allow_active>auth_admin</allow_active>
</defaults>
<annotate key="org.freedesktop.policykit.exec.path">/usr/bin/bleachbit</annotate>
<annotate key="org.freedesktop.policykit.exec.allow_gui">true</annotate>
</action>
</policyconfig>
/usr/share/polkit-1/rules.d/blueman.rules
// Allow users in sudo or netdev group to use blueman feature requiring root without authentication
polkit.addRule(function(action, subject) {
if ((action.id == "org.blueman.network.setup" ||
action.id == "org.blueman.dhcp.client" ||
action.id == "org.blueman.rfkill.setstate" ||
action.id == "org.blueman.pppd.pppconnect") &&
subject.local && subject.active &&
(subject.isInGroup("sudo") || subject.isInGroup("netdev"))) {
return polkit.Result.YES;
}
});
/var/lib/polkit-1/localauthority/10-vendor.d/org.blueman.pkla
[Changing system-wide settings through blueman]
Identity=unix-group:netdev;unix-group:sudo
Action=org.blueman.network.setup;org.blueman.dhcp.client;org.blueman.rfkill.setstate;org.blueman.pppd.pppconnect
ResultAny=no
ResultInactive=no
ResultActive=yes