Catch up to dynamically-sized cr_groups in FBSD80 65/1665/1
authorBen Kaduk <kaduk@mit.edu>
Tue, 23 Mar 2010 02:35:51 +0000 (22:35 -0400)
committerBen Kaduk <kaduk@mit.edu>
Sun, 28 Mar 2010 23:41:04 +0000 (19:41 -0400)
commit2cf1f10a3a4dac7fa944ac369b7ae5a3c45f0b9d
treeb9956c5734f63d7489a9dfd7032b983e7e13e901
parent1bb3522983ec7ee8e99ca28bb744601f1c15837c
Catch up to dynamically-sized cr_groups in FBSD80

In FreeBSD 8.0 and later, (struct ucred)->cr_groups is a pointer
to a dynamically-allocated array, and NGROUPS is now 1024 by default
(tuneable at boot).
Don't put a gid_t[NGROUPS] on the stack for the FBSD80_ENV case.
Also avoid keeping a function-local ucred structure (in
afs_osi_proc2cred()), by bypassing that function entirely
(though this accesses the process credentials directly, which may
require locking; thread credentials accesses can be safely done
lock-free).  Add an osi_Panic() to ensure that it stays that way.
Don't pretend that we have a useful afs_osi_cred to export.
Don't blindly overwrite NGROUPS past cr_groups.

Change-Id: I76295164a24bddf2782ab2fa662acd0e1b4855d6
src/afs/FBSD/osi_file.c
src/afs/FBSD/osi_groups.c
src/afs/afs_osi_gcpags.c
src/afs/afs_pioctl.c
src/afs/afs_user.c