[Pkg-utopia-maintainers] Bug#1058590: getent in polkitd.postinst is broken

Harald Dunkel harald.dunkel at aixigo.com
Fri Dec 15 12:59:02 GMT 2023


I was able to reproduce the problem in a chroot, using the postinst
script with "set -x", and even though the previously suggested fix
was applied:

:
Setting up polkitd (122-4~xgo120+1) ...
+ set -e
+ case "$1" in
+ getent -s files passwd polkitd
+ user_changed=yes
+ command -v systemd-sysusers
+ systemd-sysusers polkitd.conf
Failed to check if group polkitd already exists: Connection refused
+ dpkg --compare-versions '' lt 122-3~
++ getent -s files passwd polkitd
++ cut -d: -f6
+ '[' '' = /var/lib/polkit-1 ']'
++ id -g polkitd
id: 'polkitd': no such user
+ '[' '' = 65534 ']'
+ set_perms polkitd root 700 /etc/polkit-1/rules.d
+ USER=polkitd
+ GROUP=root
+ MODE=700
+ FILE=/etc/polkit-1/rules.d
+ dpkg-statoverride --list /etc/polkit-1/rules.d
+ chown polkitd:root /etc/polkit-1/rules.d
chown: invalid user: 'polkitd:root'
dpkg: error processing package polkitd (--configure):
  installed polkitd package post-installation script subprocess returned error exit status 1
:

Apparently the code around systemd-sysusers is to blame here. I
would guess it could not access the remote user database (LDAP/
Kerberos).

Note that the policy-rc.d script was set accordingly for a chroot:

	# cat /usr/sbin/policy-rc.d
	#!/bin/sh
	exit 101


Hope this helps

Harri



More information about the Pkg-utopia-maintainers mailing list