From 921fc0f02cc9f1f72efccfc6733fd9a14cf48b6a Mon Sep 17 00:00:00 2001 From: James Bunton Date: Sat, 17 Nov 2018 22:34:02 +1100 Subject: [PATCH] updated polkit rules --- etc/polkit-1/rules.d/99-blueman.rules | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/etc/polkit-1/rules.d/99-blueman.rules b/etc/polkit-1/rules.d/99-blueman.rules index 79c7b6e..3ab8768 100644 --- a/etc/polkit-1/rules.d/99-blueman.rules +++ b/etc/polkit-1/rules.d/99-blueman.rules @@ -1,10 +1,9 @@ -/* 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; + if (subject.user == "some-user") { + if (action.id.indexOf("org.blueman.") == 0) { + polkit.log("action=" + action); + polkit.log("subject=" + subject); + return polkit.Result.YES; + } } }); -- 2.39.2