summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTristan Van Berkom <tristan.vanberkom@codethink.co.uk>2015-11-12 20:27:11 +0900
committerTristan Van Berkom <tristan.vanberkom@codethink.co.uk>2015-11-17 19:30:29 +0900
commit9f2ce046e896714d7d5c043e6d7eb78efebf88a0 (patch)
tree26e1318cfe920a90fb11043d522be85c6d5822f8
parentf6627279567ee1826d39d80e3929b2bd3e5d7987 (diff)
downloaddefinitions-9f2ce046e896714d7d5c043e6d7eb78efebf88a0.tar.gz
Adding polkit rules for geoclue in GNOME system
It is necessary to install a polkit rules file for geoclue in order to authorize geoclue's communication with ModemManager. More details on this available in this bugreport: https://bugs.freedesktop.org/show_bug.cgi?id=92915 Change-Id: I2c30aa32a2496f2896d0d284a248b7bb7b2a942a
-rw-r--r--install-files/gnome/manifest1
-rw-r--r--install-files/gnome/usr/share/polkit-1/rules.d/geoclue-2.0.rules7
2 files changed, 8 insertions, 0 deletions
diff --git a/install-files/gnome/manifest b/install-files/gnome/manifest
index 94cd596a..79569060 100644
--- a/install-files/gnome/manifest
+++ b/install-files/gnome/manifest
@@ -1,3 +1,4 @@
0100644 0 0 /etc/securetty
overwrite 0100644 0 0 /etc/ssh/sshd_config
overwrite 0100644 0 0 /etc/pam.d/gdm-launch-environment
+0100644 0 0 /usr/share/polkit-1/rules.d/geoclue-2.0.rules
diff --git a/install-files/gnome/usr/share/polkit-1/rules.d/geoclue-2.0.rules b/install-files/gnome/usr/share/polkit-1/rules.d/geoclue-2.0.rules
new file mode 100644
index 00000000..aeb42345
--- /dev/null
+++ b/install-files/gnome/usr/share/polkit-1/rules.d/geoclue-2.0.rules
@@ -0,0 +1,7 @@
+polkit.addRule(function(action, subject) {
+ if ((action.id == "org.freedesktop.ModemManager1.Device.Control" ||
+ action.id == "org.freedesktop.ModemManager1.Location") &&
+ subject.user == "geoclue") {
+ return polkit.Result.YES;
+ }
+});