kerberos.3krb

来自「<B>Digital的Unix操作系统VAX 4.2源码</B>」· 3KRB 代码 · 共 658 行 · 第 1/2 页

3KRB
658
字号
KFAILURE.PN /etc/krb.conffile (see.PN krb.conf(5krb) )cannot be opened, or it is not properly formed..TP 15NO_TKT_FILThe ticket file does not exist..TP 15TKT_FIL_ACCThe ticket file cannot be opened or the ticket file cannot be accessed..TP 15TKT_FIL_LCKThe ticket file could not be locked for access..TP 15TKT_FIL_FMTThe ticket file format is incorrect..TP 15AD_NOTGTThere is no ticket-granting ticket in the ticket file that can be used to askfor a ticket to communicate with the foreign principal..TP 15SKDC_CANTA Kerberos server must be contacted so that.PN krb_mk_reqcan perform its function, but the attempt cannot be made because a socketcannot be opened or bound, or because there is no Kerberos server listed in.PN /etc/krb.conf ..TP 15SKDC_RETRYA Kerberos server needs to be contacted, but none responded even after severalattempts..TP 15INTK_PROTKerberos protocol error..TP 15KSUCCESSAll went well..sp 1 .IP krb_rd_req.PPThis routine is used to read the authentication data produced by principal "A"with.PN krb_mk_reqand sent by "A" to principal "B".  It takes as input the primary name and instance nameof the local principal "B", as well as the authentication data sent to "B", the addressof the machine from which "A" sent the ticket-authenticator pair, and the name of thefile in which to find the key of the local principal.If the authentication attempt is successful,.PN krb_rd_reqwill fill the \fIad\fP structure with data about the authenticated association between "A" and "B"..PPThe \f(CWkrb_rd_req\fP routine returns zero (RD_AP_OK) upon successfulauthentication.  If a packet was forged, modified, or replayed,thenauthentication fails..PPThe following is a list of the error values returned from .PN krb_mk_reqand their possible causes:.TP 16RD_AP_VERSIONThe versions of Kerberosused by the caller of.PN krb_mk_reqis incompatible with the.PN krb_rd_reqversion..TP 16RD_AP_MSG_TYPEThe ticket-authenticator pair given to.PN krb_rd_reqwas not actually a ticket-authenticator pair..TP 16RD_AP_UNDECThe ticket was indecipherable.  This error can be caused by a forged or amodified message..TP 16RD_AP_INCONThe message given to.PN krb_rd_reqcontains an internal inconsistency.  This could occur if the ticket in theticket-authenticator pair does not match the authenticator..TP 16RD_AP_BADDThe ticket-authenticator pair cannot be used from the address, \fIf_hostaddr\fP..TP 16RD_AP_TIMEThe authenticator in the ticket-authenticator pair is too old to be used to authenticate the foreign principal..TP 16RD_AP_NYVThe time at which the ticket of the ticket-authenticator pair was created, is too farahead of the time of the local host of the local principal..TP 16RD_AP_EXPThe ticket is too old to be used..ig ++.IP krb_kntolnConverts a Kerberos name to a local name.  The routine and uses the\fIpname\fP and \fIpinst\fP fields of the AUTH_DAT structure toreference the database .PN /etc/aname  and find the corresponding local name (\fIlname\fP) of the service.  Thelocal name is returned and can be used by an application to changeuids, directories, or other parameters.  The.PN krb_kntolnroutine is provided to support the use of Kerberos in existing utilities..++.ig ++.IP krb_set_keyUses a Data Encryption Standard (DES) key (\fI*key\fP) to create a keyschedule and saves the original key to be used by the application as aninitialization vector. It is used to set the key that the server usesto decrypt tickets..IPIf called with a non-zero second argument (\fIcvt\fP),.PN krb_set_keyconverts the input from a string of arbitrary length to a DES key byencrypting it with a one-way function..IPIn most cases it should not be necessary to call.PN krb_set_key .The necessary keys are usually obtained and set inside.PN krb_rd_req.  The.PN krb_set_keyroutine is provided for applications that do not wish to place theapplication keys on disk..++.sp 1.IP krb_get_cred.PPSearches the caller's ticket file forthe authentication information associated with the principal specified by the\fIf_service\fP, \fIf_instance\fP, and \fIf_realm\fP. If.PN krb_get_credfinds information in the ticket file, it fills a credentials structurewith the information and returns the status, GC_OK..PPThe following is a list of the error values returned from.PN krb_mk_reqand their possible causes:.TP 15NO_TKT_FILThe ticket file does not exist..TP 15TKT_FIL_ACCThe ticket file cannot be opened or the ticket file cannot be accessed..TP 15TKT_FIL_LCKThe ticket file could not be locked for access..TP 15TKT_FIL_FMTThe ticket file format is incorrect..TP 15GC_NOTKTInformation concerning the principal does not exist in the ticket file..sp 1.IP krb_mk_safe.PPCreates an authenticated but unencrypted message from text pointed toby \fIin\fP, of a length indicated by \fIin_length\fP. The routine usesthe private session key (\fI*key\fP) to seed the checksumalgorithm, \f(CWdes_quad_cksum\fP, that it uses as part of the authenticationprocess. (For more information about.PN des_quad_cksum ,see the .PN des_crypt(3krb)reference page.)  The.PN krb_mk_saferoutine also uses the arguments \fIl_addr\fP and \fIf_addr\fP forauthentication purposes..PPA safe message does not provide privacy, but does provide protectionagainst modifications in addition to providing authentication.  The encapsulated messageand header produced by \f(CWkrb_mk_safe\fP are placed in the areapointed to by \fIout\fP. The routine returns the length ofthe output or a negative one (\-1), indicating an error..sp 1.IP krb_rd_safe.PPAuthenticates a received.PN krb_mk_safemessage and writes the appropriate fields in the message data structure\fBMSG_DAT\fP. The argument \fIin\fP points to the beginning of thereceived message. The argument \fIin_length\fP specifies the length ofthe message. The \f(CWkrb_rd_safe\fP routine uses the private sessionkey (\fI*key\fP) to seed the .PN des_quad_cksumroutine (see the.PN des_crypt(3krb)reference page) as part of its authentication process. The routine fills in the following\fBMSG_DAT\fP fields: .PP.TStab(@);l cl l.MSG_DAT Field@Description.sp 4p\f(CWapp_data\fR@Pointer to the application data\f(CWapp_length\fR@Length of the \f(CWapp_data\fP\f(CWtime_sec\fR@Timestamp of the message in seconds\f(CWtime_5ms\fR@Timestamp of the message in 5-millisecond units\f(CWswap\fR@T{A 1 if the byte order of the receiver is different from that ofthe senderT}.TE .PPNote that the application must still determine if it is appropriate tobyte-swap application data; the Kerberos protocol fields are alreadytaken care of..PPThe.PN krb_rd_saferoutine returns RD_AP_OK if the message, \fIin\fP, is authenticated and hasnot been modified when it was sent between the foreign and the localprincipal.  It is up tothe caller to check the time sequence of messages and to check againstrecently replayed messages.The following is a list of the error values returned by.PN krb_rd_reqand their possible causes:.TP 16-1A system call used by .PN krb_rd_safereturned an error..TP 16RD_AP_VERSIONThe Kerberos version of the.PN krb_mk_safecode that generated message, \fIin\fP, is not supported by the.PN krb_rd_safeversion used..TP 16RD_AP_MSG_TYPEThe message, \fIin\fP, is not really a message produced by.PN krb_mk_safe ..TP 16RD_AP_MODIFIEDThe address of the machine from which \fIin\fP was sent does not match theaddress of the machine on which the.PN krb_mk_safemessage, \fIin\fP, was generated, or.brThe message was modified when it was sent from the foreign to the localprincipal, or.brThe message, \fIin\fP, is too small to be the message produced by.PN krb_mk_req ..TP 16RD_AP_TIMEThe difference between the time at which the message, \fIin\fP, was producedby.PN krb_mk_reqand the time at which it was read by.PN krb_rd_reqis too large.  The time difference must be within five minutes..ig ++.IP krb_mk_errConstructs an application level error message that may be used alongwith the.PN krb_mk_privand the.PN krb_mk_saferoutines. The argument \fIout\fP is a pointer to the output buffer,\fIcode\fP is an application specific error code, and \fIstring\fPis an application specific error string..IP krb_rd_errRoutine unpacks a received.PN krb_mk_errmessage and writes the appropriate fields in the message structure\fBMSG_DAT\fP. The argument \fIin\fP points to the beginning of thereceived message. The message length is specified by \fIin_length\fP.The argument \fIcode\fP is a pointer to a value to be filled in withthe error value provided by the application. The argument\fI*msg_data\fP is a pointer to the structure MSG_DAT. The routinewrites the following \fBMSG_DAT\fP fields:.PP.TStab(@);c cl l.MSG_DAT Field@Description.sp 4p\f(CWapp_data\fR@Pointer to the application data\f(CWapp_length\fR@Length of the \f(CWapp_data\fP\f(CWswap\fR@T{A 1 if the byte order of the receiver is different from that of thesenderT}.TE .PP.IP The .PN krb_rd_errroutine returns zero if the error message has been successfully received,or a Kerberos error code..++.SH RestrictionsThe caller of the functions,.PN krb_rd_reqand.PN krb_rd_safe ,must check the timeorder of messages and protect against replay attempts. .SH Files.TP.PN /usr/include/krb.h.TP.PN /usr/lib/libkrb.a.TP.PN /usr/include/des.h.TP.PN /usr/lib/libdes.a.TP.PN /etc/srvtab.SH See Alsodes_crypt(3krb), krb_sendmutual(3krb), krb_sendauth(3krb), krb_svc_init(3krb),krb_set_tkt_string(3krb), krb.conf(5krb)

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?