1
0
Fork 0
mirror of https://gitlab.alpinelinux.org/alpine/aports.git synced 2025-07-23 03:05:48 +03:00
aports/community/modemmanager/modemmanager.rules
Dylan Van Assche ca28e4dedb community/modemmanager: fix polkit rules for GeoClue integration
Current polkit rules block GeoClue from interacting with ModemManager when a location request is received by GeoClue. Allow GeoClue to use the org.freedesktop.ModemManager1.Device.Control and org.freedesktop.ModemManager1.Location DBus APIs
2021-04-05 19:47:18 +00:00

19 lines
736 B
Text

// Let users in plugdev group modify ModemManager
polkit.addRule(function(action, subject) {
if ((action.id == "org.freedesktop.ModemManager1.Device.Control" ||
action.id == "org.freedesktop.ModemManager1.Contacts" ||
action.id == "org.freedesktop.ModemManager1.Messaging" ||
action.id == "org.freedesktop.ModemManager1.Location") &&
subject.isInGroup("plugdev") && subject.active) {
return "yes";
}
});
// Let geoclue modify ModemManager for location gathering
polkit.addRule(function(action, subject) {
if ((action.id == "org.freedesktop.ModemManager1.Device.Control" ||
action.id == "org.freedesktop.ModemManager1.Location") &&
subject.isInGroup("geoclue")) {
return "yes";
}
});