Loading
polkit: fix polkit-agent-helper@ sandbox for pam_u2f
polkit 127 switched to socket activation with a systemd unit for
polkit-agent-helper that uses PrivateDevices=yes and ProtectHome=yes.
This breaks pam_u2f (and potentially other PAM modules that interact
with hardware), because:
- PrivateDevices=yes creates a private /dev without hidraw devices,
so FIDO tokens are inaccessible
- ProtectHome=yes blocks reading ~/.config/Yubico/u2f_keys
- StandardError=inherit causes polkit agents to misinterpret PAM
diagnostic output as protocol errors, resulting in tight
re-execution loops
Fix by overriding these properties in the polkit module:
- StandardError=journal unconditionally (benefits all PAM modules)
- PrivateDevices/DeviceAllow/ProtectHome when pam_u2f is enabled
Co-authored-by:
Victor Luft <victor@luft.io>