search for: add_members_to_userlist

Displaying 1 result from an estimated 1 matches for "add_members_to_userlist".

2003 Jun 13
0
Problem with large NIS groups - Samba 2.2.8
...involves a sequential search and it turns out to be unacceptably expensive: struct sys_userlist *get_users_in_group_by_gid(gid_t gid) { struct sys_userlist *list_head = NULL; struct group *gptr; setgrent(); while((gptr = getgrent()) != NULL) { if (gid == gptr->gr_gid) { list_head = add_members_to_userlist(list_head, gptr); if (list_head == NULL) return NULL; } } endgrent(); return list_head; } It all comes down to the fact that matches are not done against an instantiated user context with all groups mapped to GIDs. Is there any way other than using netgroups to make these matche...