.\" $Source: /home/cvs/386BSD/src/kerberosIV/man/krb_realmofhost.3,v $
.\" $Header: /home/cvs/386BSD/src/kerberosIV/man/krb_realmofhost.3,v 1.1.1.1 1994/02/25 01:14:44 wollman Exp $
.\" Copyright 1989 by the Massachusetts Institute of Technology.
.\" For copying and distribution information,
.\" please see the file <mit-copyright.h>.
.TH KRB_REALMOFHOST 3 "Kerberos Version 4.0" "MIT Project Athena"
krb_realmofhost, krb_get_phost, krb_get_krbhst, krb_get_admhst,
krb_get_lrealm \- additional Kerberos utility routines
#include <kerberosIV/krb.h>
#include <kerberosIV/des.h>
char *krb_realmofhost(host)
char *krb_get_phost(alias)
krb_get_krbhst(host,realm,n)
krb_get_admhst(host,realm,n)
returns the Kerberos realm of the host
as determined by the translation table
.IR /etc/kerberosIV/krb.realms .
should be the fully-qualified domain-style primary host name of the host
in question. In order to prevent certain security attacks, this routine
knowledge of a host's realm, or obtain such information securely.
The format of the translation file is described by
exactly matches a host_name line, the corresponding realm
Otherwise, if the domain portion of
matches a domain_name line, the corresponding realm
contains a domain, but no translation is found,
domain is converted to upper-case and returned.
contains no discernible domain, or an error occurs,
the local realm name, as supplied by
(which can be either an official name or an alias) into the instance
name to be used in obtaining Kerberos tickets for most services,
including the Berkeley rcmd suite (rlogin, rcp, rsh).
The current convention is to return the first segment of the official
domain-style name after conversion to lower case.
host running a Kerberos key distribution center (KDC)
as specified in the configuration file (\fI/etc/kerberosIV/krb.conf\fR).
The configuration file is described by
If the host is successfully filled in, the routine
If the file cannot be opened, and
equals 1, then the value of KRB_HOST as defined in
is filled in, and KSUCCESS is returned. If there are fewer than
hosts running a Kerberos KDC for the requested realm, or the
configuration file is malformed, the routine
host running a Kerberos KDC database administration server
as specified in the configuration file (\fI/etc/kerberosIV/krb.conf\fR).
If the file cannot be opened or is malformed, or there are fewer than
hosts running a Kerberos KDC database administration server,
the routine returns KFAILURE.
The character arrays used as return values for
should be large enough to
hold any hostname (MAXHOSTNAMELEN from <sys/param.h>).
realm of the local host, as specified in the configuration file.
should be at least REALM_SZ (from
.IR <krb.h>) characters long.
kerberos(3), krb.conf(5), krb.realms(5)
/etc/kerberosIV/krb.realms
translation file for host-to-realm mapping.
local realm-name and realm/server configuration file.
The current convention for instance names is too limited; the full
domain name should be used.
= 1. It should really consult the user's ticket cache to determine the
user's current realm, rather than consulting a file on the host.