Skip to content

daemon: Don't crash if /etc/shadow doesn't exist

Simon McVittie requested to merge smcv/accountsservice-branches:no-shadow into main

Turning off shadow passwords with shadowconfig off or pwunconv (so that the hashed password is in /etc/passwd) is something that distributions still at least half-support, and apparently some people genuinely do this. After resolving #107 (closed) this would cause accountsservice to crash. Looking at the implementation, it seems the same crash would happen if /etc/shadow is present but empty.

In this situation, treat all users as non-local (unless cached) with a warning, but don't crash.

Bug-Debian: https://bugs.debian.org/1031309

Merge request reports