[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [OpenAFS] Re: retaining AFS-specific nameless group IDs (PAG) in `id
From: |
Chas Williams (CONTRACTOR) |
Subject: |
Re: [OpenAFS] Re: retaining AFS-specific nameless group IDs (PAG) in `id' and `groups' |
Date: |
Fri, 25 Apr 2008 10:08:09 -0400 |
In message <address@hidden>,Jim Meyering writes:
>Maybe you can help (this may save you trouble in terms of
>avoided regressions later ;-):
>
> - how can I detect (in Perl or Bourne shell) whether the
> current system is AFS-enabled?
there is currently no single method. at one point, afs patched the
syscall table to present the necessary ioctl but now it creates a
a special /proc entry, /proc/fs/openafs/afs_ioctl, when the syscall
table cant be patched.
> - is there always exactly one PAG?
currently, a process can only belong to a single PAG.
and ealier someone asked (perhaps Didi <address@hidden>):
> If someone can provide code to determine efficiently
> whether a nameless GID is a PAG then we can probably
> make everyone happy. If that happens, I'll need to
> know if there's a standard or accepted mapping from
> GID to PAG group name. Pointers to unencumbered code
> would be welcome.
with the keyring code, PAG's are no longer exposed to the user
as a number. however, in the older group based PAG support, the
PAG id is encoded as:
('A' << 24) + (pagCounter++ & 0xffffff));
but this is split across two groups, given that most gids are
still 16 bits in most places. the relevant code here is:
g0 -= 0x3f00;
g1 -= 0x3f00;
if (g0 < 0xc000 && g1 < 0xc000) {
l = ((g0 & 0x3fff) << 14) | (g1 & 0x3fff);
h = (g0 >> 14);
h = (g1 >> 14) + h + h + h;
ret = ((h << 28) | l);
if (((ret >> 24) & 0xff) == 'A')
return ret;
}
return NOPAG;
so a pag group will be atleast > 0x3f00 and after you get the value for
ret, you should verify that the upper 8 bits are an 'A'. g0 and g1
should always be 'next' to each other in the group list.
- Re: coreutils-6.11 released, (continued)
- Re: coreutils-6.11 released, Russ Allbery, 2008/04/20
- Re: [OpenAFS] Re: coreutils-6.11 released, Davor Ocelic, 2008/04/20
- Re: [OpenAFS] Re: coreutils-6.11 released, Brandon S. Allbery KF8NH, 2008/04/20
- Re: [OpenAFS] Re: coreutils-6.11 released, Jim Meyering, 2008/04/20
- Re: [OpenAFS] Re: coreutils-6.11 released, Didi, 2008/04/21
- Re: [OpenAFS] Re: coreutils-6.11 released, Brandon S. Allbery KF8NH, 2008/04/21
- Re: [OpenAFS] Re: coreutils-6.11 released, Jim Meyering, 2008/04/21
- retaining AFS-specific nameless group IDs (PAG) in `id' and `groups', Jim Meyering, 2008/04/22
- Re: retaining AFS-specific nameless group IDs (PAG) in `id' and `groups', Adam Megacz, 2008/04/22
- Re: retaining AFS-specific nameless group IDs (PAG) in `id' and `groups', Jim Meyering, 2008/04/23
- Re: [OpenAFS] Re: retaining AFS-specific nameless group IDs (PAG) in `id' and `groups',
Chas Williams (CONTRACTOR) <=
- Re: [OpenAFS] Re: retaining AFS-specific nameless group IDs (PAG) in `id' and `groups', Russ Allbery, 2008/04/25
- coreutils-6.11 released, Elbert Pol, 2008/04/20
- Re: coreutils-6.11 released, Jim Meyering, 2008/04/21
- Re: coreutils-6.11 released, Elbert Pol, 2008/04/21
- Re: coreutils-6.11 released, Jim Meyering, 2008/04/22
- Re: coreutils-6.11 released, Elbert Pol, 2008/04/22
- Re: coreutils-6.11 released, Jim Meyering, 2008/04/22
- Message not available
- Re: coreutils-6.11 released, Jim Meyering, 2008/04/23
Re: coreutils-6.11 released, Bruce Korb, 2008/04/20