[OpenAFS] home on afs woes

Russ Allbery rra@stanford.edu
Wed, 11 Jan 2006 15:15:56 -0800

Jeffrey Hutzelman <jhutz@cmu.edu> writes:

> 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.

Certainly such a library would be useful.  If someone wants to implement
it without all of the dependencies that Heimdal libkafs has, I'd be all in
favor of it.  Heimdal's libkafs has significant dependencies and isn't
really suitable for use outside of a system built with Heimdal in general.

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

Providing setpag in a shared library that's actually maintainable is,
right now, unfeasible in OpenAFS without a great deal of work.  If you
don't agree, please do say so, but I looked at it somewhat seriously and
it was way more work that I thought was likely to happen.  It requires,
for instance, pulling in all of Rx.

Doing that work requires caring way more about the NFS translator than I
do, I'm afraid.

> 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.

I think it would be better, yes, but it's a lot more work if you want to
really match APIs, since that requires providing krb_afslog and

Basically, we'd be talking about taking most of aklog and putting it in a
library.  Which isn't at all a bad idea, but it's a larger project, and
I'd really like to see a solution for this in the shorter term.  Long
term, absolutely, I think that's a fine idea, and if we can keep it
API-compatible with Heimdal, that would be awesome.

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