nss-systemd: properly handle empty membership lists
authorLennart Poettering <lennart@poettering.net>
Wed, 5 May 2021 16:57:30 +0000 (18:57 +0200)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Sat, 15 May 2021 17:46:56 +0000 (19:46 +0200)
commit83c39430c06620ab208cdeeaaef9da31dd882a91
tree1664c5c24b52f248538e94f5669812c31db126ba
parentc3dfbd10da31324158363d6da50345ece24ccaf5
nss-systemd: properly handle empty membership lists

When we are queried for membership lists on a system that has exactly
zero, then we'll return ESRCH immediately instead of at EOF. Which is
OK, but we need to handle this in various places, and not get confused
by it.

(cherry picked from commit a1aa41e4e175c2712b97600d7e10e9d6c58e5543)
(cherry picked from commit d0f8a01a74e5a1bed4d687339abde774cb944579)
src/nss-systemd/nss-systemd.c
src/nss-systemd/userdb-glue.c