summaryrefslogtreecommitdiff
path: root/pcr/polkit-consolekit/polkit.install
diff options
context:
space:
mode:
Diffstat (limited to 'pcr/polkit-consolekit/polkit.install')
-rw-r--r--pcr/polkit-consolekit/polkit.install14
1 files changed, 10 insertions, 4 deletions
diff --git a/pcr/polkit-consolekit/polkit.install b/pcr/polkit-consolekit/polkit.install
index e917e0095..422db623c 100644
--- a/pcr/polkit-consolekit/polkit.install
+++ b/pcr/polkit-consolekit/polkit.install
@@ -1,9 +1,15 @@
post_install() {
- getent group polkitd >/dev/null || groupadd -g 102 polkitd
- getent passwd polkitd >/dev/null || useradd -c 'Policy Kit Daemon' -u 102 -g polkitd -d '/' -s /bin/false polkitd
- passwd -l polkitd &>/dev/null
+ getent group polkitd || groupadd -g 102 polkitd
+ getent passwd polkitd || useradd -c 'Policy Kit Daemon' -u 102 -g polkitd -G proc -d '/' -s /usr/bin/nologin polkitd
+ passwd -l polkitd &>/dev/null
}
post_upgrade() {
- post_install
+ post_install
+
+ if (( $(vercmp $2 0.113-6) < 0 )); then
+ usermod -aG proc -s /usr/bin/nologin polkitd
+ chown root:102 /{etc,usr/share}/polkit-1/rules.d
+ chmod 750 /{etc,usr/share}/polkit-1/rules.d
+ fi
}