1 --- libnss-pgsql-1.5.0-beta/src/backend.c.org 2010-10-24 13:36:18.218410000 +0200
2 +++ libnss-pgsql-1.5.0-beta/src/backend.c 2010-10-24 13:37:56.853302000 +0200
3 @@ -757,14 +757,18 @@ size_t backend_initgroups_dyn(const char
7 - if(rows+(*start) > *size) {
8 + if(rows+(*start)+1 > *size) {
9 // Have to make the result buffer bigger
10 - long int newsize = rows + (*start);
11 + long int newsize = rows + (*start) + 1;
12 newsize = (limit > 0) ? MIN(limit, newsize) : newsize;
13 *groupsp = groups = realloc(groups, newsize * sizeof(*groups));
17 + // gid_t group should be added to the output list (man 3 initgroups)
18 + groups[*start] = group;
21 rows = (limit > 0) ? MIN(rows, limit - *start) : rows;