[OpenAFS-devel] setgroups() fails to change pag under linux 2.6

Jeffrey Hutzelman jhutz@cmu.edu
Mon, 24 Jul 2006 12:09:40 -0400


On Monday, July 24, 2006 11:43:46 AM -0400 chas williams - CONTRACTOR 
<chas@cmf.nrl.navy.mil> wrote:

> In message <EB443598E205C86A6380E9A4@sirius.fac.cs.cmu.edu>,Jeffrey
> Hutzelman w rites:
>> The 8 bits aren't about indicating that the group encoding is valid;
>> they're not even encoded.  They're about distinguishing PAG's from UID's
>> in  all the _other_ places where they appear.
>
> i suspect a single bit would be sufficient to distingush between pag's
> and uid's?  it does appear to be encoded in the pag and is used as
> some sort of check to see if the value derived from the groups is a
> pag.  perhaps i dont understand afs_get_pag_from_groups().

Ugh; you're right.  I'd forgotten about the bizarre divide-by-three 
encoding for the top four bits, which are always constant anyway.

> well i guess the range would just grow.

I get the impression people might not like that.
Now, it doesn't bother me; our UID's are capped at 16K until we work out 
some namespace allocation issues, and we're not in danger of exceeding that 
soon.  But other people might feel differently.