Main index | Section 3 | Options |
#include <kafs.h>
k_hasafs_recheck() forces a recheck if a AFS client has started since last time k_hasafs() or k_hasafs_recheck() was called.
kafs_set_verbose() set a log function that will be called each time the kafs library does something important so that the application using libkafs can output verbose logging. Calling the function kafs_set_verbose with the function argument set to NULL will stop libkafs from calling the logging function (if set).
kafs_settoken_rxkad() set rxkad with the token and ticket (that have the length ticket_len) for a given cell.
kafs_settoken() and kafs_settoken5() work the same way as kafs_settoken_rxkad() but internally converts the Kerberos 4 or 5 credential to a afs cleartoken and ticket.
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.
krb5_afslog(), and krb5_afslog_uid() are the Kerberos 5 equivalents of krb_afslog(), and krb_afslog_uid().
krb5_afslog(), kafs_settoken5() can be configured to behave differently via a krb5_appdefault option afs-use-524 in krb5.conf. Possible values for afs-use-524 are:
yes | use the 524 server in the realm to convert the ticket |
no | use the Kerberos 5 ticket directly, can be used with if the afs cell support 2b token. |
local, 2b | |
convert the Kerberos 5 credential to a 2b token locally (the same work as a 2b 524 server should have done). | |
Example:
[appdefaults] SU.SE = { afs-use-524 = local } PDC.KTH.SE = { afs-use-524 = yes } afs-use-524 = yes
libkafs will use the libkafs as application name when running the krb5_appdefault function call.
The (uppercased) cell name is used as the realm to the krb5_appdefault
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() system call 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.
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. | |
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); }
AFS-3 Programmer's Reference, File Server/Cache Manager Interface, 1991.
,HEIMDAL | KAFS (3) | May 1, 2006 |
Main index | Section 3 | Options |
Please direct any comments about this manual page service to Ben Bullock. Privacy policy.
“ | Never write it in C if you can do it in `awk'; Never do it in `awk' if `sed' can handle it; Never use `sed' when `tr' can do the job; Never invoke `tr' when `cat' is sufficient; Avoid using `cat' whenever possible. |
” |
— Taylor's Laws of Programming |