diff options
author | Martijn Braam <martijn@brixit.nl> | 2020-02-09 19:16:01 +0100 |
---|---|---|
committer | Rasmus Thomsen <oss@cogitri.dev> | 2020-02-10 21:35:08 +0100 |
commit | a240403216ddab6f0a86587fc945dbdbc7e4aed5 (patch) | |
tree | 806c0a5fd3600c48ae96d39c06bd03d24d17159f /community/modemmanager | |
parent | 6ceb5352607c8a7ca9f583e6d394e8d085678e01 (diff) | |
download | aports-a240403216ddab6f0a86587fc945dbdbc7e4aed5.tar.bz2 aports-a240403216ddab6f0a86587fc945dbdbc7e4aed5.tar.xz |
community/modemmanager: rewrite polkit rules
Rewrite polkit rules to no longer use a regex but use seperate string
comparisons instead. This brings it in line with the
gnome-control-center rules. This fixes crashes in polkitd when this
rule is invoked.
Diffstat (limited to 'community/modemmanager')
-rw-r--r-- | community/modemmanager/APKBUILD | 4 | ||||
-rw-r--r-- | community/modemmanager/modemmanager.rules | 5 |
2 files changed, 6 insertions, 3 deletions
diff --git a/community/modemmanager/APKBUILD b/community/modemmanager/APKBUILD index f60d08fd7e..0e45787415 100644 --- a/community/modemmanager/APKBUILD +++ b/community/modemmanager/APKBUILD @@ -2,7 +2,7 @@ # Maintainer: Stuart Cardall <developer@it-offshore.co.uk> pkgname=modemmanager pkgver=1.12.4 -pkgrel=0 +pkgrel=1 pkgdesc="ModemManager library" url="http://www.freedesktop.org/wiki/Software/ModemManager" arch="all" @@ -69,5 +69,5 @@ check() { } sha512sums="a0eb87e16ea32b8c0646667787ca8c88bf16a589d858fb134b814d7352ac9c84925ec168eaa49257e79ccd8b5d7cfe6cc5add8369e524ea14d88982a5b00fc8a ModemManager-1.12.4.tar.xz -3c76ee577334e25c836857f8e7fef6a249cdd9fcd8f889cb64d9c1667bc6a95c087267a153bddd1a13256c59f8cd578ccb448e6b9cb54b73bb74acb8a0ca1e3f modemmanager.rules +8d736f477649e42c05b34ac55391353c7f0c17138d039e049b16b07624d86fd9968ef1aa14672a63decf8b2c0ae984a34a0770322198b326775efba58f566685 modemmanager.rules e2769401c52c3fff0b8057c13c6f7f2e5656c2963239ecbd647a01e66a344f6852cf2ba065358248315945bdf6ebbc4976903565b12ace2d15df6586dcc1de5b modemmanager.initd" diff --git a/community/modemmanager/modemmanager.rules b/community/modemmanager/modemmanager.rules index 09e586e642..6b4a95fbc8 100644 --- a/community/modemmanager/modemmanager.rules +++ b/community/modemmanager/modemmanager.rules @@ -1,6 +1,9 @@ // Let users in plugdev group modify ModemManager polkit.addRule(function(action, subject) { - if (/^org\.freedesktop\.ModemManager1\.(Device\.Control|Contacts|Messaging|Location)$/.test(action.id) && + 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"; } |