📄 krb_get_lrealm.3krb
字号:
.TH krb_get_lrealm 3krb.SH Namekrb_get_lrealm \- Host/realm identification routines..SH Syntax.nf.nj \fB#include <krb.h> #include <des.h>.PP \fBkrb_get_lrealm\fP (\fIrealm, n\fP) \fBchar\fP \fI*realm\fP; \fBint\fP \fIn\fP;.ig ++#include <netinet/in.h>\fP.PP \fBchar *krb_realmofhost\fP (\fIhost\fP) \fBchar\fP \fI*host\fP;.++.PP \fBchar *krb_get_phost\fP (\fIalias\fP) \fBchar\fP \fI*alias\fP;.ig ++.PP \fBkrb_get_krbhst\fP (\fIhost, realm, n\fP) \fBchar\fP \fI*host\fP; \fBchar\fP \fI*realm\fP; \fBint\fP \fIn\fP;.PP \fBkrb_get_admhst\fP (\fIhost, realm, n\fP) \fBchar\fP \fI*host\fP; \fBchar\fP \fI*realm\fP; \fBint\fP \fIn\fP;.++.PP.fi.SH Arguments.ig ++.TP 9.I hostIdentifies a host for a particular realm..++.TP.I aliasIdentifies a host whose name is to be converted to an instance name.The \fIalias\fP string is overwritten with the instance name. The \fIalias\fP string must be stored in a buffer of at leastINST_SZ characters. .TP.I realmIdentifies a specific realm..TP.I nSpecifies a specific position in a series of Kerberos hosts; must be set to 0..SH Description.NXR "Kerberos routines" "krb_get_lrealm".NXR "Kerberos routines" "krb_get_phost"The routines of.ig ++.PN krb_realmofhost.++.PN krb_get_lrealmallow an application to obtain information on host/realmrelationships in a Kerberos network. The routines of this library are:.ig ++.IP krb_realmofhostReturns the Kerberos realm of the host identified by the pointer\fI*host\fP as determined by the translation file \f(CWkrb_realms\fP.The name you enter for host should be the fully qualified domain-styleprimary host name of the host. To prevent security attacks,this routine must already know the realm of thehost or obtain this information securely..IPThe format of the translation file is described in the .PN krb.realms(5krb)reference page. If \fIhost\fP matches either a \fIhost_name\fP line ora \fIdomain_name\fP line of the \f(CWkrb.realms\fP file, then thecorresponding realm is returned..br.ne 4.++.IP krb_get_phostConverts the hostname pointed to by \fIalias\fP, which can be either anofficial name or an alias, into the instance name to be used inobtaining Kerberos tickets..ig ++.IP krb_get_krbhstInitializes \fIhost\fP with the hostname of the \fIn\fPth host runninga Kerberos key distribution center (KDC) for the realm pointed to by\fIrealm\fP. The host configuration file is described by the file.PN krb.conf .If .PN krb_get_krbhst successfully initializes\fIhost\fP, the routine returns KSUCCESS. .IPIf the configuration file cannot be opened, and \fIn\fP equals 1, then.PN krb_get_krbhstinitializes \fIhost\fP with the value of theconstant \fBKRB_HOST\fP (defined in .PN krb.h ) and returnsKSUCCESS. If there are fewer that \fIn\fP hosts running a Kerberos KDCfor the requested realm, or the configuration file is damaged, then.PN krb_get_krbhstreturns KFAILURE. .IP krb_get_admhstInitializes \fIhost\fP with the hostname of the \fIn\fPth host runninga Kerberos KDC database administration server for the realm pointed toby \fIrealm\fP as specified in the configuration file .PN krb.conf .If .PN krb_get_admhstcannot open the configuration file or findsthat the file is damaged, it returns KFAILURE..IPNote that the character arrays used as return values of the.PN krb_get_krbhstand.PN krb_get_admhstroutines should belarge enough to hold the maximum host name.determined by the constantMAXHOSTNAMLEN, which is defined in the.PN param.hfile..++.IP krb_get_lrealmInitializes \fIrealm\fP with the \fIn\fPth realm of the local host. Theargument \fIrealm\fP should be large enough to contain the maximumrealm name determined by the constant REALM_SZ. The local realm name isstored in the.PN /etc/krb.conffile. See the .PN krb.conf(5krb)reference page..SH Files.ig ++.TP.PN krb.realms.++.TP.PN /etc/krb.conf.SH See Alsokerberos(3krb), krb.conf(5krb)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -