Package: libnss-ldapd
Version: 0.6.7.1
Using the test code attached (to track down what was a bug in
libnss-ldap), errno is being set after a specific getgrent call.
There are 214 people in the group, totalling 4164 bytes so this may
well just be a "too large" error coming back (no other group
complains, but this is probably the longest group).
./a.out:
....
group: jira-administrators
group: jira-developers
errno a : 34 (Numerical result out of range)
group: jira-users
Thanks,
Adrian
--
bitcube.co.uk - Linux infrastructure consultancy
Puppet, Debian, Red Hat, Ubuntu, CentOS, ...
#include <sys/types.h>
#include <grp.h>
#include <stdio.h>
#include <errno.h>
main()
{
struct group * group;
errno=0;
while(group=getgrent())
{
if (errno != 0) {
printf("errno a : %d (%s)\n",errno, strerror(errno));
}
//printf("group: %s\n",group->gr_name);
if (strcmp(group->gr_name,"audio")==0 ||
strcmp(group->gr_name,"skypeclient")==0) {
printf ("found group %s\n",group->gr_name);
}
errno=0;
}
endgrent();
if (errno != 0) {
printf("errno b : %d\n",errno);
}
setgrent();
if (errno != 0) {
printf("errno c : %d\n",errno);
}
printf("round two\n");
while(group=getgrent())
{
if (errno != 0) {
printf("errno d : %d\n",errno);
}
if (strcmp(group->gr_name,"audio")==0 ||
strcmp(group->gr_name,"skypeclient")==0) {
printf ("found group %s\n",group->gr_name);
}
}
}