URL:
https://github.com/SSSD/sssd/pull/5542
Author: sumit-bose
Title: #5542: nss client: make innetgr() thread safe
Action: opened
PR body:
"""
The innetgr() call is expected to be thread safe but SSSD's the current
implementation isn't. In glibc innetgr() is implementend by calling the
setnetgrent(), getnetgrent(), endgrent() sequence with a private context
(struct __netgrent) with provides a member where NSS modules can store data
between the calls.
With this patch setnetgrent() will open a new connection to the NSS
responder and stores the file descriptor in the data member of
__netgrent struct so that the following getnetgrent() and endgrent() will
use the same connection. Since the NSS responder stores the netgroup
lookups related data in a per connection context and a new thread will open
a new connection the implementation is thread safe.
Resolves:
https://github.com/SSSD/sssd/issues/5540
"""
To pull the PR as Git branch:
git remote add ghsssd
https://github.com/SSSD/sssd
git fetch ghsssd pull/5542/head:pr5542
git checkout pr5542