[OpenAFS-devel] Proposed new kafs interface: k_getpag

Russ Allbery rra@stanford.edu
Wed, 15 Jul 2009 21:41:01 -0700


Hello everyone,

In the current development version, OpenAFS has added a new pioctl that's
used to retrieve the current PAG (if any).  This 'C' pioctl 13, or
_AFSCIOCTL(13) in the Heimdal kafs parlance.  It returns the current PAG
number or 0xffffffff (NOPAG) if the process is not in a PAG.

I would like to add this to the libkopenafs library so that it can be used
by PAM modules.  (It's useful for an AFS PAM module to support the
operation of "put this process in a PAG if it isn't already in a PAG, but
don't leave the current PAG if it exists.")  However, the intention of the
libkopenafs interface is that it remain API-compatible with the Heimdal
libkafs interface.  We intend to add the additional functions, including
the token manipulation functions, down the road.

So, I'd like to propose the following interface and get any feedback if
the Heimdal community sees a problem with it:

    #define K_NOPAG 0xffffffffU
    uint32_t k_getpag(void);

If that seems like a reasonable interface, I can provide a patch to
Heimdal to add it to libkafs.

-- 
Russ Allbery (rra@stanford.edu)             <http://www.eyrie.org/~eagle/>