This revision will address the segfault occurring with cold caches.
I fixed 2 aspects.
1) I fixed the actual segfault where it was occurring by simply returning early
from the function if gnum = 0, because in that case there are no groups we can
invalidate anyways.
2) I now check and return short in the provider code if initgroups return both 0
results and 1 result, because in that case it means that the user either does
not exist at all or it is there but memberships have never been filled in so
again there is really nothing to check in NSS.
The rest is unchanged.
Simo Sorce (5):
mmap cache: public functions to invalidate records
Hook to perform a mmap cache update from sssd_nss
Hook for mmap cache update on initgroup calls
Add backchannel NSS provider query on initgr calls
Always append rctx as private data
src/providers/data_provider.h | 7 +
src/providers/data_provider_be.c | 165 ++++++++++++++++++++++++++
src/responder/common/responder_common.c | 2 +-
src/responder/nss/nsssrv.c | 68 +++++++++++
src/responder/nss/nsssrv_cmd.c | 191 +++++++++++++++++++++++++++++++
src/responder/nss/nsssrv_mmap_cache.c | 125 ++++++++++++++++++++
src/responder/nss/nsssrv_mmap_cache.h | 10 ++
src/responder/nss/nsssrv_private.h | 6 +
8 files changed, 573 insertions(+), 1 deletions(-)