[OpenAFS] home on afs woes

Jeffrey Hutzelman jhutz@cmu.edu
Wed, 11 Jan 2006 18:06:05 -0500


On Wednesday, January 11, 2006 02:33:37 PM -0800 Russ Allbery 
<rra@stanford.edu> wrote:

> You probably don't really need to do this, as Heimdal comes with an afslog
> that should work fine -- although, I don't know if it supports the -setpag
> flag to set a PAG for the parent process.  Unfortunately, doing PAM
> properly requires either that or linking with the AFS libraries.

No it doesn't.  All it needs is a relatively simple library which provides 
a way to check for the presence of AFS and to make AFS system calls, 
particularly setpag and pioctl.

Conveniently, heimdal comes with such a library; it's called libkafs and 
includes functions like k_hasafs(), k_pioctl(), k_unlog(), and k_setpag().
IIRC, Derrick used to distribute a standalone version of this library for 
people not using Heimdal, but it's probably pretty stale by now.

> Linking with the AFS libraries will be easier in the 1.4.1 release since
> there will then be a shared library that contains only the lsetpag()
> function, at which point my intention is to significantly overhaul the way
> that PAGs and aklog are handled in Debian.

Ugh.  lsetpag() is not really intended to be a public interface.  The 
public interface provided by AFS is called setpag().

Also, I'd suggest that instead of a shared library containing only lsetpag, 
it might be better to provide a library containing the functions I named 
above, with the same API that the KTH folks have been distributing for 
years.

-- Jeff