Title: #5542: nss client: make innetgr() thread safe
Wouldn't it be possible to use `thread_local` instead?
in general yes, and I was thinking about this as well. I guess you a are thinking of using
the `tread_local` file descriptor for other requests as well which do not have a memory
context to store the file descriptor? My main concern so far was that since we do not
close the sockets an application with many threads might end up with many open sockets.
See the full comment at https://github.com/SSSD/sssd/pull/5542#issuecomment-809388569