From 709315400c9735a2360e01c927e5a3816a5dc2d3 Mon Sep 17 00:00:00 2001 From: Ben Kaduk Date: Wed, 31 Mar 2010 11:27:38 -0400 Subject: [PATCH] Fix build for FBSD80 The change to a dynamically-allocated group list came before the change to allow the maximum size of that group list to be set as a tuneable at boot. The 8.0 release happened to come between them, so we must treat both cases. (Note that AFS_FBSD81_ENV is not yet defined anywhere; that will come later.) Change-Id: I87a0e2cff3c42de60d512fe5653abe0161afc789 Reviewed-on: http://gerrit.openafs.org/1676 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear --- src/afs/FBSD/osi_groups.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/afs/FBSD/osi_groups.c b/src/afs/FBSD/osi_groups.c index aa4a334b87..3c54d279dd 100644 --- a/src/afs/FBSD/osi_groups.c +++ b/src/afs/FBSD/osi_groups.c @@ -75,12 +75,15 @@ int setpag(struct thread *td, struct ucred **cred, afs_uint32 pagvalue, afs_uint32 * newpag, int change_parent) { -#ifdef AFS_FBSD80_ENV +#if defined(AFS_FBSD81_ENV) gid_t *gidset; - int gidset_len = ngroups_max; + int gidset_len = ngroups_max + 1; +#elif defined(AFS_FBSD80_ENV) + gid_t *gidset; + int gidset_len = NGROUPS; /* 1024 */ #else gid_t gidset[NGROUPS]; - int gidset_len = NGROUPS; + int gidset_len = NGROUPS; /* 16 */ #endif int ngroups, code; int j;