]> code.delx.au - monosys/blobdiff - etc/polkit-1/rules.d/99-blueman.rules
blueman polkit fix
[monosys] / etc / polkit-1 / rules.d / 99-blueman.rules
diff --git a/etc/polkit-1/rules.d/99-blueman.rules b/etc/polkit-1/rules.d/99-blueman.rules
new file mode 100644 (file)
index 0000000..79c7b6e
--- /dev/null
@@ -0,0 +1,10 @@
+/* Allow users in sudo 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.isInGroup("sudo")) {
+        return polkit.Result.YES;
+    }
+});