*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->NetBSD man pages -> kafs (3)              
Title
Content
Arch
Section
 

KAFS(3)

Contents


NAME    [Toc]    [Back]

     k_hasafs, k_pioctl, k_unlog, k_setpag, k_afs_cell_of_file, krb_afslog,
     krb_afslog_uid - AFS library

LIBRARY    [Toc]    [Back]

     Kerberos IV AFS Library (libkafs, -lkafs)

SYNOPSIS    [Toc]    [Back]

     #include <kerberosIV/kafs.h>

     int
     k_afs_cell_of_file(const char *path, char *cell, int len);

     int
     k_hasafs();

     int
     k_pioctl(char *a_path, int o_opcode, struct ViceIoctl *a_paramsP,
             int a_followSymlinks);

     int
     k_setpag();

     int
     k_unlog();

     int
     krb_afslog(char *cell, char *realm);

     int
     krb_afslog_uid(char *cell, char *realm, uid_t uid);

DESCRIPTION    [Toc]    [Back]

     k_hasafs() initializes some library internal structures, and tests for
     the presence of AFS in the kernel, none of the other functions should be
     called before k_hasafs() is called, or if it fails.

     krb_afslog(), and krb_afslog_uid() obtains new tokens (and possibly tickets)
 for the specified cell and realm.  If cell is NULL, the local cell
     is used. If realm is NULL, the function tries to guess what realm to use.
     Unless you  have some good knowledge of what cell or realm to use, you
     should pass NULL.  krb_afslog() will use the real user-id for the ViceId
     field in the token, krb_afslog_uid() will use uid.

     k_afs_cell_of_file() will in cell return the cell of a specified file, no
     more than len characters is put in cell.

     k_pioctl() does a pioctl() syscall with the specified arguments. This
     function is equivalent to lpioctl().

     k_setpag() initializes a new PAG.

     k_unlog() removes destroys all tokens in the current PAG.

RETURN VALUES    [Toc]    [Back]

     k_hasafs() returns 1 if AFS is present in the kernel, 0 otherwise.
     krb_afslog() and krb_afslog_uid() returns 0 on success, or a kerberos
     error number on failure.  k_afs_cell_of_file(), k_pioctl(), k_setpag(),
     and k_unlog() all return the value of the underlaying system call, 0 on
     success.

ENVIRONMENT    [Toc]    [Back]

     The following environment variable affect the mode of operation of kafs:

     AFS_SYSCALL  Normally, kafs will try to figure out the correct system
                  call(s) that are used by AFS by itself.  If it does not manage
 to do that, or does it incorrectly, you can set this
                  variable to the system call number or list of system call
                  numbers that should be used.

EXAMPLES    [Toc]    [Back]

     The following code from login will obtain a new PAG and tokens for the
     local cell and the cell of the users home directory.

     if (k_hasafs()) {
             char cell[64];
             k_setpag();
             if(k_afs_cell_of_file(pwd->pw_dir, cell, sizeof(cell)) == 0)
                     krb_afslog(cell, NULL);
             krb_afslog(NULL, NULL);
     }

ERRORS    [Toc]    [Back]

     If any of these functions (apart from k_hasafs()) is called without AFS
     beeing present in the kernel, the process will usually (depending on the
     operating system) receive a SIGSYS signal.

SEE ALSO    [Toc]    [Back]

      
      
     Transarc Corporation, "File Server/Cache Manager Interface", AFS-3
     Programmer's Reference, 1991.

BSD                               May 7, 1997                              BSD
[ Back ]
 Similar pages
Name OS Title
form_field_just NetBSD form library
form_field_info NetBSD form library
form_field_new NetBSD form library
form_field_userptr NetBSD form library
form_field_opts NetBSD form library
o32fft IRIX o32 vs. n32/64 FFT library differences
form_field_buffer NetBSD form library
f OpenBSD S/Key library functions
rlhistory FreeBSD GNU History Library
form_field_attributes NetBSD form library
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service