[OpenAFS] Perl - Determine if the shell is in a PAG

Jeffrey Hutzelman jhutz@cmu.edu
Wed, 06 Dec 2006 19:18:41 -0500

On Wednesday, December 06, 2006 08:25:07 AM -0500 chas williams - 
CONTRACTOR <chas@cmf.nrl.navy.mil> wrote:

> In message <4575DDA1.8010407@mitre.org>,Jeff Blaine writes:
>> @groups = POSIX::getgroups();
> i wont get hung up on checking the group list to see if you are in
> a pag.  if/when afs starting using the keyring only those magic
> groups will no longer be in the group list.  you might be able to
> examine /proc/keys or call keyctl show to see if you have an
> afs_pag:_pag key associated with your current session.

Yes, but that would be highly platform-dependent.
I suppose we could add a pioctl for this.