diff options
| author | Lukas Slebodnik <lslebodn@redhat.com> | 2015-04-07 10:53:12 +0200 |
|---|---|---|
| committer | Jakub Hrozek <jhrozek@redhat.com> | 2015-04-07 14:44:51 +0200 |
| commit | d51bc5f43fffa516446ef62c2b860be9fa939c9d (patch) | |
| tree | ecd87f878355376ff8208c3bd7133152cd3e3b75 /src/python | |
| parent | 41f13bb048dbc4241dcfc024cdc3ec535510ba6b (diff) | |
| download | sssd-d51bc5f43fffa516446ef62c2b860be9fa939c9d.tar.gz sssd-d51bc5f43fffa516446ef62c2b860be9fa939c9d.tar.xz sssd-d51bc5f43fffa516446ef62c2b860be9fa939c9d.zip | |
CLIENT: Clear errno with enabled sss-default-nss-plugin
Although errno was cleared in function sss_nss_make_request
some sss glic functions set errno with value of output argument errnop.
Reproducer:
* sssd compiled with enabled option sss-default-nss-plugin
* sss is the last value in group (/etc/nsswitch.conf)
* sssd-client is installed but sssd is stopped.
C-program:
#include <stdio.h>
#include <stdlib.h>
#include <errno.h>
#include <grp.h>
int main(int argc, char *argv[])
{
struct group *p_group;
setgrent();
while (1) {
errno = 0; /* initialize for getgrent() */
p_group = getgrent();
if (p_group == NULL) {
if (errno == 0) {
break; /* end of groups */
} else {
perror("getgrent");
printf("getgrent error %d \n", errno);
endgrent();
exit(-2);
}
}
printf("getgrent() OK group(%d) = %s \n",
p_group->gr_gid, p_group->gr_name);
}
exit(0);
}
Resolves:
https://fedorahosted.org/sssd/ticket/2619
Reviewed-by: Pavel Reichl <preichl@redhat.com>
Diffstat (limited to 'src/python')
0 files changed, 0 insertions, 0 deletions
