URL:
https://github.com/SSSD/sssd/pull/89
Title: #89: nss: rewrite nss responder so it uses cache_req
pbrezina commented:
"""
Enumeration, services and memory leak were fixed.
* Enumeration issue was caused by calling `talloc_get_type()` on non-talloc pointer.
* Services issue was caused by not lowercasing protocol name on case-insensitive
domains.
* Memory leak was caused by not freeing subrequest after calling `_recv()`
* The valgrind issues were caused by initgroups when we were leaving an uninitialized
value when no original primary gid was inserted. Fixed with:
```c
if (orig_gid == 0) {
/* Initialize allocated memory to be safe and make valgrind happy. */
SAFEALIGN_SET_UINT32(&body[rp], 0, &rp);
} else {
/* Insert original primary group into the result. */
SAFEALIGN_COPY_UINT32(&body[rp], &orig_gid, &rp);
num_results++;
}
```
I can successfully log-in with seeded user now without any valgrind error, but I was able
to login with this user even before these changes, so I hope this is fixed as well.
"""
See the full comment at
https://github.com/SSSD/sssd/pull/89#issuecomment-265446392