[OpenAFS-devel] PAGs/tokens/threads

Chas Williams (CONTRACTOR) chas@cmf.nrl.navy.mil
Fri, 21 Aug 2009 09:47:48 -0400


In message <Pine.LNX.4.64.0908211340470.4787@ossigeno.math.unifi.it>,Alberto Ma
ncini writes:
>My concerns are:
>
> 	1. as in previous code any preexistent keyring is replaced,
> 	   is this acceptable ?

not really, but i didnt see a good way to handle things at the time.
keyring still isnt very mature and there isnt any standard userspace
utility that runs at login to create an empty session keyring in the
first place.  ideally i guess you would create a new keyring and merge
the existing keys on the right (excluding the pag key).

> 	2. is frustrating not to have exported necessary functions from
> 	   the kerel, a previous thread in this list concluded, as I
> 	   undestand, that there is no option, still true ?

still true.  it is unlikely that any GPL export would have the gpl
tag removed.  there was talking of creating a generic pag style
interface and submitting it to the kernel.  however, there wouldnt
be any consumers in the kernel so it would likely be rejected.

> 	3. the name of the installed keyring is ``_afs.``
> 	   nobody seems to care about the name as i know,
> 	   but the kernel code use different names for different
> 	   keryring types ... opinions ?

prefixing with _ might have special meaning.  i would check the code.

> 	4. what about other architectures ?

it is called linux keyring support.  if anyone else had something similar
we could write a middleware i suppose.

>To test the function i'm still using a syscall but i'd like to try a 
>new pioctl; any advice ? Really the code is not so easy so any help
>would be good (e.g. where to start !)

just look at setpag.  its an ioctl.