k_hasafs k_pioctl k_unlog k_setpag k_afs_cell_of_file kafs_set_verbose kafs_settoken_rxkad kafs_settoken krb_afslog krb_afslog_uid kafs_settoken5 krb5_afslog krb5_afslog_uid - AFS library
AFS cache manager access library (libkafs5, -lkafs5)
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
Fa 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
Fa token
and
Fa ticket
(that have the length
Fa ticket_len )
for a given
Fa 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
Fa cell
and
Fa realm .
If
Fa cell
is
NULL
the local cell is used. If
Fa 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
Fa 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 diffrently via a
krb5_appdefault
option
afs-use-524
in
krb5.conf
Possible values for
afs-use-524
are:
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) cellname is used as the realm to the krb5_appdefault function.
k_afs_cell_of_file ();
will in
Fa cell
return the cell of a specified file, no more than
Fa len
characters is put in
Fa 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.
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); }
Закладки на сайте Проследить за страницей |
Created 1996-2024 by Maxim Chirkov Добавить, Поддержать, Вебмастеру |