diff options
author | Christian Hesse <mail@eworm.de> | 2024-09-11 09:47:57 +0200 |
---|---|---|
committer | Christian Hesse <mail@eworm.de> | 2024-09-11 10:15:27 +0200 |
commit | 532e746da530781dbe8073021156f4f1dd8e2cda (patch) | |
tree | 891728f84dd5c3865632c38f1c6fdb063e6f2721 /polkit | |
parent | 3d2aaec9a604282bf0e561df6e676277dd079c7f (diff) | |
download | pacman-offline-532e746da530781dbe8073021156f4f1dd8e2cda.tar.gz pacman-offline-532e746da530781dbe8073021156f4f1dd8e2cda.tar.zst |
ship a polkit rule...
... to allow running `pacman-offline` without authentication
for users of group `wheel`.
Diffstat (limited to 'polkit')
-rw-r--r-- | polkit/pacman-offline.rules | 11 |
1 files changed, 11 insertions, 0 deletions
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; + } + } +); |