summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
8935933)
When we get into auth_unix_gid at the second time, groups_len
is not 0 and ngroups variable leave as 0. Then we use ngroups
in getgrouplist that fails in this case. This patch fixes it.
Signed-off-by: Pavel Shilovsky <piastry@etersoft.ru>
Signed-off-by: Steve Dickson <steved@redhat.com>
static gid_t *groups = NULL;
static int groups_len = 0;
gid_t *more_groups;
static gid_t *groups = NULL;
static int groups_len = 0;
gid_t *more_groups;
- groups_len = ngroups = INITIAL_MANAGED_GROUPS;
+ groups_len = INITIAL_MANAGED_GROUPS;
+ ngroups = groups_len;
+
if (readline(fileno(f), &lbuf, &lbuflen) != 1)
return;
if (readline(fileno(f), &lbuf, &lbuflen) != 1)
return;