HomeFreeBSD

sysutils/polkit: Fix directory permissions to allow reading config files

Description

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

Details