NetworkManager: add rules for policykit

allows members of the group 'network' to access NetworkManager.
This commit is contained in:
Enno Boland 2020-05-04 15:55:54 +02:00 committed by Enno Boland
parent cb65ec9a7b
commit e9edb25850
2 changed files with 8 additions and 1 deletions

View file

@ -0,0 +1,5 @@
polkit.addRule(function(action, subject) {
if (action.id.indexOf("org.freedesktop.NetworkManager.") == 0 && subject.isInGroup("network")) {
return polkit.Result.YES;
}
});

View file

@ -1,7 +1,7 @@
# Template file for 'NetworkManager'
pkgname=NetworkManager
version=1.22.10
revision=1
revision=2
build_style=meson
build_helper="gir qemu"
configure_args="-Dpolkit_agent=true -Dsystemd_journal=false
@ -68,6 +68,8 @@ pre_configure() {
post_install() {
vinstall ${FILESDIR}/${pkgname}.conf 644 etc/${pkgname}
vinstall ${FILESDIR}/50-org.freedesktop.NetworkManager.rules 644 \
/usr/share/polkit-1/rules.d
vsv ${pkgname}
}