--On Monday, September 01, 2008 11:12:31 PM +0000 "Daniel Richard G."
<[EMAIL PROTECTED]> wrote:
If we use libafs, we may as well go all the way and have find(1) check the
permissions on each directory (if in AFS) and cue off of that.
libafs is not the library you are looking for.
OpenAFS calls the library you are looking for libsys, but it has quite a
few dependencies. By the time you pull in everything, you end up with a
complete copy of the Rx libraries, among other things (this is not
gratuitous; under certain circumstances the library will handle AFS "system
calls" by making an RPC instead of a system call. This allows AFS
utilities to work on a system which has user-mode tools but no AFS kernel
module, and so is using an AFS/NFS translator).
If it's available, you're better off using libkrbafs or libkafs, which
provide a more minimal interface consisting of k_hasafs() and k_pioctl(),
plus a few things you don't need.
Note that you cannot assume that AFS exists and AFS system calls will work
just because you found AFS libraries. Some of the libraries mentioned
above are included in a number of Linux distributions and may be included
in other systems as well, and even if AFS is installed, the AFS kernel
module may not yet be loaded. On some platforms, you will get SIGSYS if
you try to make an AFS system call under these circumstances. The
libkrbafs/libkafs interfaces will protect you from this; k_hasafs() is
always safe to call, and if it succeeds, then you know you can call
k_pioctl() safely.
-- Jeff