Title: #5542: nss client: make innetgr() thread safe
The innetgr() call is expected to be thread safe but SSSD's the
implementation isn't. In glibc innetgr() is implementend by calling the
setnetgrent(), getnetgrent(), endgrent() sequence with a private context
(I guess `endgrent()` is a mistype and should be `endnetgrent()`)
I would appreciate a more detailed description of a race.
IIUC, the issue is that concurrent *netgrent() read and modify the same context in
See the full comment at https://github.com/SSSD/sssd/pull/5542#issuecomment-809486328