.\" $Source: /usr/src/kerberosIV/man/RCS/tf_util.3,v $
.\" $Header: /usr/src/kerberosIV/man/RCS/tf_util.3,v 4.3 90/06/25 21:12:43 kfall Exp $
.\" Copyright 1989 by the Massachusetts Institute of Technology.
.\" For copying and distribution information,
.\" please see the file <mit-copyright.h>.
.TH TF_UTIL 3 "Kerberos Version 4.0" "MIT Project Athena"
tf_init, tf_get_pname, tf_get_pinst, tf_get_cred, tf_close \-
routines for manipulating a Kerberos ticket file
#include <kerberosIV/krb.h>
extern char *krb_err_txt[];
This group of routines are provided to manipulate the Kerberos tickets
file. A ticket file has the following format:
principal's name (null-terminated string)
principal's instance (null-terminated string)
Where "CREDENTIAL_x" consists of the following fixed-length
fields from the CREDENTIALS structure (defined in <kerberosIV/krb.h>):
must be called before the other ticket file
It takes the name of the ticket file to use,
and a read/write flag as arguments.
It tries to open the ticket file, checks the mode and if
everything is okay, locks the file. If it's opened for
reading, the lock is shared. If it's opened for writing,
KSUCCESS is returned if all went well, otherwise one of the
NO_TKT_FIL - file wasn't there
TKT_FIL_ACC - file was in wrong mode, etc.
TKT_FIL_LCK - couldn't lock the file, even after a retry
reads the principal's name from a ticket file.
It should only be called after tf_init has been called. The
principal's name is filled into the
well, KSUCCESS is returned.
If tf_init wasn't called, TKT_FIL_INI
If the principal's name was null, or EOF was encountered, or the
name was longer than ANAME_SZ, TKT_FIL_FMT is returned.
reads the principal's instance from a ticket file.
It should only be called after tf_init and tf_get_pname
The principal's instance is filled into the
well, KSUCCESS is returned.
If tf_init wasn't called, TKT_FIL_INI
If EOF was encountered, or the
name was longer than INST_SZ, TKT_FIL_FMT is returned.
Note that, unlike the principal name, the instance name may be null.
routine reads a CREDENTIALS record from a ticket file and
fills in the given structure.
It should only be called after
tf_init, tf_get_pname, and tf_get_pinst have been called.
If all goes well, KSUCCESS is returned. Possible error codes
TKT_FIL_INI - tf_init wasn't called first
EOF - end of file encountered
closes the ticket file and releases the lock on it.
The ticket file routines have to be called in a certain order.
Jennifer Steiner, MIT Project Athena
Bill Bryant, MIT Project Athena
Copyright 1987 Massachusetts Institute of Technology