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>
Fri, 7 May 2021 10:13:17 +0000 (12:13 +0200)
commitd0f8a01a74e5a1bed4d687339abde774cb944579
tree2f136e04435172e14f9bb68cf09da5d21703c6ab
parent18babc7b290de4c0108b2fe39400c3e9c471ef67
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)
src/nss-systemd/nss-systemd.c
src/nss-systemd/userdb-glue.c