Remove deprecated PolicyKit authorization files (#477)

* start

* clean up

* remove pkla

* clean up

* not needed

* and that
This commit is contained in:
Shane Smiskol
2025-07-15 18:28:30 -07:00
committed by GitHub
parent dd57b1e1b2
commit abf7a1ac46
4 changed files with 9 additions and 11 deletions
+1 -3
View File
@@ -127,7 +127,6 @@ RUN cd /tmp && \
libpolkit-gobject-1-0 \
libsystemd0 \
polkitd \
polkitd-pkla \
mobile-broadband-provider-info && \
apt-get -o Dpkg::Options::="--force-overwrite" install -yq ./libqmi.deb && \
apt-get -o Dpkg::Options::="--force-overwrite" install -yq ./modemmanager.deb && \
@@ -176,8 +175,7 @@ COPY ./userspace/firmware/* /lib/firmware/
# populate /etc
COPY ./userspace/files/fstab /etc
COPY ./userspace/files/profile /etc/profile
COPY ./userspace/files/allow-network-control.pkla /etc/polkit-1/localauthority/50-local.d/allow-network-control.pkla
COPY ./userspace/files/allow-modem-control.pkla /etc/polkit-1/localauthority/50-local.d/allow-modem-control.pkla
COPY ./userspace/files/comma-polkit.rules /etc/polkit-1/rules.d/
COPY ./userspace/files/*.rules /etc/udev/rules.d/
COPY ./userspace/files/ssh*_config /etc/ssh/
COPY ./userspace/files/logrotate.conf /etc/
-4
View File
@@ -1,4 +0,0 @@
[Allow sudo users to control modem]
Identity=unix-group:sudo
Action=org.freedesktop.ModemManager1.*
ResultAny=yes
@@ -1,4 +0,0 @@
[Allow sudo users to control networking]
Identity=unix-group:sudo
Action=org.freedesktop.NetworkManager.*
ResultAny=yes
+8
View File
@@ -0,0 +1,8 @@
// Allow sudo users to control network & modem
polkit.addRule(function (action, subject) {
if ((action.id.startsWith("org.freedesktop.NetworkManager.") ||
action.id.startsWith("org.freedesktop.ModemManager1.")) &&
subject.isInGroup("sudo")) {
return polkit.Result.YES;
}
});