mirror of
https://git.openafs.org/openafs.git
synced 2025-01-22 17:00:15 +00:00
use-NGROUPS-MAX-instead-of-constant-for-curpag-getgroups-call-20011110
NGROUPS_MAX instead of 30 used so we get all groups from getgroups
This commit is contained in:
parent
de99fc23d4
commit
4c9808b25b
@ -166,7 +166,7 @@ out:
|
||||
/* get the current AFS pag for the calling process */
|
||||
static afs_int32 curpag()
|
||||
{
|
||||
gid_t groups[30];
|
||||
gid_t groups[NGROUPS_MAX];
|
||||
afs_uint32 g0, g1;
|
||||
afs_uint32 h, l, ret;
|
||||
|
||||
|
@ -84,11 +84,11 @@ char **argv;
|
||||
|
||||
static afs_uint32 curpag()
|
||||
{
|
||||
afs_uint32 groups[30];
|
||||
afs_uint32 groups[NGROUPS_MAX];
|
||||
afs_uint32 g0, g1;
|
||||
afs_uint32 h, l, ret;
|
||||
|
||||
if (getgroups(30, groups) < 2) return 0;
|
||||
if (getgroups(sizeof groups/sizeof groups[0], groups) < 2) return 0;
|
||||
|
||||
g0 = groups[0] & 0xffff;
|
||||
g1 = groups[1] & 0xffff;
|
||||
|
Loading…
Reference in New Issue
Block a user