URL:
https://github.com/SSSD/sssd/pull/89
Title: #89: nss: rewrite nss responder so it uses cache_req
lslebodn commented:
"""
Regression test for
https://fedorahosted.org/sssd/ticket/2865 failed
or it was
https://fedorahosted.org/sssd/ticket/2170
Following C-code was executed for existing and non-existing group
```
#include <netdb.h>
#include <stdio.h>
int main(int argc, char** argv) {
const long MAX = 10000000;
const char* netgroup = "nonexisting";
int percentage = 0;
int ret;
if (argc != 2) {
fprintf(stderr, "Wrong count of arguments, using netgroup:[%s]\n",
netgroup);
} else {
netgroup = argv[1];
}
long i;
for(i=0; i<MAX; i++){
ret = setnetgrent(netgroup);
if (! ret) {
//perror("setnetgrent failed\n");
}
endnetgrent();
if (percentage != i * 100 / MAX) {
fprintf(stderr, "%d%% ", ++percentage);
}
}
return 0;
}
```
"""
See the full comment at
https://github.com/SSSD/sssd/pull/89#issuecomment-264905646