From: Nick Ingolia Date: Thu, 14 Nov 2002 19:47:12 +0000 (+0000) Subject: If ngroups in the parent is 0, but the first two elements of the groups X-Git-Tag: openafs-stable-1_2_8~64 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=8fd66bec84a9724e4ef80c71cc149ab4165676fe;p=packages%2Fo%2Fopenafs.git If ngroups in the parent is 0, but the first two elements of the groups array represent a valid PAG (perhaps because they weren't zeroed), then set_pag_in_parent won't add 2 to ngroups and the parent process won't join the PAG. (cherry picked from commit f5e96f747edc8674b6bf529b9c88d07799d9b10c) --- diff --git a/src/afs/LINUX/osi_groups.c b/src/afs/LINUX/osi_groups.c index 922fddff1..e031bd456 100644 --- a/src/afs/LINUX/osi_groups.c +++ b/src/afs/LINUX/osi_groups.c @@ -42,7 +42,7 @@ int set_pag_in_parent(int pag, int g0, int g1) gp = current->p_pptr->groups; - if (afs_get_pag_from_groups(gp[0], gp[1]) == NOPAG) { + if ((ngroups < 2) || (afs_get_pag_from_groups(gp[0], gp[1]) == NOPAG)) { /* We will have to shift grouplist to make room for pag */ if (ngroups + 2 > NGROUPS) { return EINVAL;