From 532e746da530781dbe8073021156f4f1dd8e2cda Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Wed, 11 Sep 2024 09:47:57 +0200 Subject: ship a polkit rule... ... to allow running `pacman-offline` without authentication for users of group `wheel`. --- polkit/pacman-offline.rules | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 polkit/pacman-offline.rules (limited to 'polkit') diff --git a/polkit/pacman-offline.rules b/polkit/pacman-offline.rules new file mode 100644 index 0000000..82cc5c2 --- /dev/null +++ b/polkit/pacman-offline.rules @@ -0,0 +1,11 @@ +/* Allow members of the wheel group to run pacman-offline */ + +polkit.addRule( + function(action, subject) { + if (action.id == "org.freedesktop.policykit.exec" && + action.lookup("program") == "/usr/bin/pacman-offline" && + subject.isInGroup("wheel")) { + return polkit.Result.YES; + } + } +); -- cgit v1.2.3-70-g09d2