summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2016-06-04 20:02:04 +0200
committerMichał Górny <mgorny@gentoo.org>2016-06-04 20:11:15 +0200
commit7724be2064e7f967ff1678165c514a698d8c526c (patch)
tree699937d07465baf80fc6cfae27394b832253e1e4 /net-wireless/blueman/files/01-org.blueman.rules
parentsavannah: switch to https URLs (diff)
downloadgentoo-7724be2064e7f967ff1678165c514a698d8c526c.tar.gz
gentoo-7724be2064e7f967ff1678165c514a698d8c526c.tar.bz2
gentoo-7724be2064e7f967ff1678165c514a698d8c526c.zip
net-wireless/blueman: include polkit rules for network setup, #584300
Add a set of polkit rules that allow active users belonging to the plugdev group to perform network setup actions via blueman. This resembles the rules used by NetworkManager. Bug: https://bugs.gentoo.org/show_bug.cgi?id=584300
Diffstat (limited to 'net-wireless/blueman/files/01-org.blueman.rules')
-rw-r--r--net-wireless/blueman/files/01-org.blueman.rules11
1 files changed, 11 insertions, 0 deletions
diff --git a/net-wireless/blueman/files/01-org.blueman.rules b/net-wireless/blueman/files/01-org.blueman.rules
new file mode 100644
index 000000000000..2f1a2bd36ee7
--- /dev/null
+++ b/net-wireless/blueman/files/01-org.blueman.rules
@@ -0,0 +1,11 @@
+// Let users in plugdev group modify network connections using blueman
+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("plugdev") && subject.active) {
+
+ return polkit.Result.YES;
+ }
+});