summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Woods <woodsb02@FreeBSD.org>2017-02-12 15:50:52 +0000
committerBen Woods <woodsb02@FreeBSD.org>2017-02-12 15:50:52 +0000
commitd748bb465848959f3da6d01a0d76b2ea1c750fbf (patch)
tree4ef8afe0b9a26a7460006b345b26e77644225ba9
parentAdd one sed command, courtesy of madpilot, to replicate a section of changes (diff)
sysutils/polkit: Fix directory permissions to allow reading config files
If the $LOCALBASE/etc/polkit-1 directory is owned by root and set 700, then polkit which is running as the polkitd user cannot read the config files in $LOCALBASE/etc/polkit-1/rules.d/* resulting in this error: Loading rules from directory /usr/local/etc/polkit-1/rules.d Error opening rules directory: Error opening directory \ '/usr/local/etc/polkit-1/rules.d': Permission denied \ (g-file-error-quark, 2) Loading rules from directory /usr/local/share/polkit-1/rules.d To fix this, change the $LOCALBASE/etc/polkit-1 to be set 755, and the $LOCALBASE/etc/polkit-1/localauthority to be set 700. This was sense checked with Fedora Linux which does the same, and with Debian/Ubuntu which have /etc/polkit-1/localauthority as owned by root:polkitd and set 750. PR: 202615 Reported by: rozhuk.im@gmail.com
-rw-r--r--sysutils/polkit/Makefile2
-rw-r--r--sysutils/polkit/pkg-plist3
2 files changed, 3 insertions, 2 deletions
diff --git a/sysutils/polkit/Makefile b/sysutils/polkit/Makefile
index a23727b7c812..fb8fb99f75a6 100644
--- a/sysutils/polkit/Makefile
+++ b/sysutils/polkit/Makefile
@@ -3,7 +3,7 @@
PORTNAME= polkit
PORTVERSION= 0.113
-PORTREVISION= 2
+PORTREVISION= 3
CATEGORIES= sysutils gnome
MASTER_SITES= http://www.freedesktop.org/software/polkit/releases/
diff --git a/sysutils/polkit/pkg-plist b/sysutils/polkit/pkg-plist
index 6b69ef2ca1ef..85967af246e0 100644
--- a/sysutils/polkit/pkg-plist
+++ b/sysutils/polkit/pkg-plist
@@ -64,7 +64,8 @@ share/polkit-1/actions/org.freedesktop.policykit.policy
@dir etc/polkit-1/localauthority/30-site.d
@dir etc/polkit-1/localauthority/20-org.d
@dir etc/polkit-1/localauthority/10-vendor.d
-@dir(,,700) etc/polkit-1
+@dir(,,700) etc/polkit-1/localauthority
+@dir etc/polkit-1
@dir /var/lib/polkit-1/localauthority/90-mandatory.d
@dir /var/lib/polkit-1/localauthority/50-local.d
@dir /var/lib/polkit-1/localauthority/30-site.d