mirror of
https://github.com/commaai/agnos-builder.git
synced 2026-09-30 19:33:46 +08:00
Remove deprecated PolicyKit authorization files (#477)
* start * clean up * remove pkla * clean up * not needed * and that
This commit is contained in:
+1
-3
@@ -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/
|
||||
|
||||
@@ -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
|
||||
@@ -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;
|
||||
}
|
||||
});
|
||||
Reference in New Issue
Block a user