Github messages for voidlinux
 help / color / mirror / Atom feed
From: Gottox <Gottox@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: [PR PATCH] NetworkManager: add rules for policykit
Date: Mon, 04 May 2020 15:56:40 +0200	[thread overview]
Message-ID: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-21608@inbox.vuxu.org> (raw)

[-- Attachment #1: Type: text/plain, Size: 452 bytes --]

There is a new pull request by Gottox against master on the void-packages repository

https://github.com/Gottox/void-packages issue-21578
https://github.com/void-linux/void-packages/pull/21608

NetworkManager: add rules for policykit
allows members of the group 'network' to access NetworkManager. Fixes https://github.com/void-linux/void-packages/issues/21578

A patch file from https://github.com/void-linux/void-packages/pull/21608.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-issue-21578-21608.patch --]
[-- Type: text/x-diff, Size: 1701 bytes --]

From 0249a6980a9af2724aa06a530570bc2d2529262e Mon Sep 17 00:00:00 2001
From: Enno Boland <gottox@voidlinux.org>
Date: Mon, 4 May 2020 15:55:54 +0200
Subject: [PATCH] NetworkManager: add rules for policykit

allows members of the group 'network' to access NetworkManager.
---
 .../files/50-org.freedesktop.NetworkManager.rules            | 5 +++++
 srcpkgs/NetworkManager/template                              | 4 +++-
 2 files changed, 8 insertions(+), 1 deletion(-)
 create mode 100644 srcpkgs/NetworkManager/files/50-org.freedesktop.NetworkManager.rules

diff --git a/srcpkgs/NetworkManager/files/50-org.freedesktop.NetworkManager.rules b/srcpkgs/NetworkManager/files/50-org.freedesktop.NetworkManager.rules
new file mode 100644
index 00000000000..8c933b7e8a4
--- /dev/null
+++ b/srcpkgs/NetworkManager/files/50-org.freedesktop.NetworkManager.rules
@@ -0,0 +1,5 @@
+polkit.addRule(function(action, subject) {
+	if (action.id.indexOf("org.freedesktop.NetworkManager.") == 0 && subject.isInGroup("network")) {
+		return polkit.Result.YES;
+	}
+});
diff --git a/srcpkgs/NetworkManager/template b/srcpkgs/NetworkManager/template
index 71ccbe8bcdc..edeb8278579 100644
--- a/srcpkgs/NetworkManager/template
+++ b/srcpkgs/NetworkManager/template
@@ -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}
 }
 

             reply	other threads:[~2020-05-04 13:56 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-04 13:56 Gottox [this message]
2020-05-04 13:58 ` Gottox
2020-05-05  7:27 ` flexibeast
2020-05-05 12:09 ` [PR PATCH] [Merged]: " Gottox

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-21608@inbox.vuxu.org \
    --to=gottox@users.noreply.github.com \
    --cc=ml@inbox.vuxu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).