-
Notifications
You must be signed in to change notification settings - Fork 231
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CLIENT: fix thread unsafe acces to get*ent structs.
All get*ent structs were protected with socket mutex. In case SSSD is built with lock-free client support, `sss_nss_lock()` is a no-op, thus resulting in thread unsafe access. This patch changes those structs to have thread local storage. This conradicts following note in the man page: ``` The function getgrent_r() is not really reentrant since it shares the reading position in the stream with all other threads. ``` I'm not sure if 3rd party apps can legally assume this behaviour based on a note in a man page. And in some cases, non-sharing reading position between threads might make more sense. But that way or another, this is better than thread unsafe access. Reviewed-by: Pavel Březina <pbrezina@redhat.com> Reviewed-by: Sumit Bose <sbose@redhat.com>
- Loading branch information
1 parent
3c99354
commit 69fd828
Showing
5 changed files
with
40 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters