logind: avoid shadow lookups when doing userdb client side
authorLennart Poettering <lennart@poettering.net>
Thu, 9 Apr 2020 12:28:56 +0000 (14:28 +0200)
committerMichael Biebl <biebl@debian.org>
Sun, 7 Jun 2020 22:56:37 +0000 (23:56 +0100)
commit07ad68785b17814f3f9ba57314cba6de1d5f4e8f
tree2c05dde7124f9c1aca1afce34bb9ce216018abb5
parent35ac90aac703f49d898d7eced1d07eb5efaf282a
logind: avoid shadow lookups when doing userdb client side

Let's not trigger MACs needlessly.

Ideally everybody would turn on userdb, but if people insist in not
doing so, then let's not attempt to open shadow.

It's a bit ugly to implement this, since shadow information is more than
just passwords (but accound validity metadata), and thus userdb's own
"privieleged" scheme is orthogonal to this, but let's still do this for
the client side.

Fixes: #15105
(cherry picked from commit b062ca616c778358d4da008a2950615fac74aa24)

Gbp-Pq: Name logind-avoid-shadow-lookups-when-doing-userdb-client-side.patch
src/login/logind-core.c