📄 tf_util.3
字号:
.\" $Source: /usr/src/kerberosIV/man/RCS/tf_util.3,v $.\" $Author: kfall $.\" $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".SH NAMEtf_init, tf_get_pname, tf_get_pinst, tf_get_cred, tf_close \-routines for manipulating a Kerberos ticket file.SH SYNOPSIS.nf.nj.ft B#include <kerberosIV/krb.h>.PP.ft Bextern char *krb_err_txt[];.PP.ft Btf_init(tf_name, rw)char *tf_name;int rw;.PP.ft Btf_get_pname(pname)char *pname;.PP.ft Btf_get_pinst(pinst)char *pinst;.PP.ft Btf_get_cred(c)CREDENTIALS *c;.PP.ft Btf_close().PP.fi.SH DESCRIPTIONThis group of routines are provided to manipulate the Kerberos ticketsfile. A ticket file has the following format:.nf.in +4.spprincipal's name (null-terminated string)principal's instance (null-terminated string)CREDENTIAL_1CREDENTIAL_2 ...CREDENTIAL_nEOF.sp.in -4.LPWhere "CREDENTIAL_x" consists of the following fixed-lengthfields from the CREDENTIALS structure (defined in <kerberosIV/krb.h>):.nf.sp.in +4 char service[ANAME_SZ] char instance[INST_SZ] char realm[REALM_SZ] des_cblock session int lifetime int kvno KTEXT_ST ticket_st long issue_date.in -4.sp.fi.PP.I tf_initmust be called before the other ticket fileroutines.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 ifeverything is okay, locks the file. If it's opened forreading, the lock is shared. If it's opened for writing,the lock is exclusive.KSUCCESS is returned if all went well, otherwise one of thefollowing:.nf.spNO_TKT_FIL - file wasn't thereTKT_FIL_ACC - file was in wrong mode, etc.TKT_FIL_LCK - couldn't lock the file, even after a retry.sp.fi.PPThe.I tf_get_pnamereads the principal's name from a ticket file.It should only be called after tf_init has been called. Theprincipal's name is filled into the .I pnameparameter. If all goeswell, KSUCCESS is returned.If tf_init wasn't called, TKT_FIL_INIis returned.If the principal's name was null, or EOF was encountered, or thename was longer than ANAME_SZ, TKT_FIL_FMT is returned..PPThe.I tf_get_pinstreads the principal's instance from a ticket file.It should only be called after tf_init and tf_get_pnamehave been called.The principal's instance is filled into the .I pinstparameter.If all goeswell, KSUCCESS is returned.If tf_init wasn't called, TKT_FIL_INIis returned.If EOF was encountered, or thename was longer than INST_SZ, TKT_FIL_FMT is returned.Note that, unlike the principal name, the instance name may be null..PPThe.I tf_get_credroutine reads a CREDENTIALS record from a ticket file andfills in the given structure.It should only be called aftertf_init, tf_get_pname, and tf_get_pinst have been called.If all goes well, KSUCCESS is returned. Possible error codesare:.nf.spTKT_FIL_INI - tf_init wasn't called firstTKT_FIL_FMT - bad formatEOF - end of file encountered.sp.fi.PP.I tf_closecloses the ticket file and releases the lock on it..SH "SEE ALSO"krb(3).SH DIAGNOSTICS.SH BUGSThe ticket file routines have to be called in a certain order..SH AUTHORSJennifer Steiner, MIT Project Athena.brBill Bryant, MIT Project Athena.SH RESTRICTIONSCopyright 1987 Massachusetts Institute of Technology
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -