[342] in Kerberos
converting a hostname into its realm
daemon@TELECOM.MIT.EDU (John T Kohl)
Mon Apr 4 14:08:11 1988
From: John T Kohl <jtkohl@ATHENA.MIT.EDU>
To: kerberos@ATHENA.MIT.EDU
We have a need in the Kerberos system to determine the realm of a host
given its Internet domain name.
One convention established in a system in use at MIT is to take the
domain name (e.g. MIT.EDU, S1.GOV) as the domain name. For historical
reasons, this fails at MIT, so we need to translate the MIT.EDU into
ATHENA.MIT.EDU, the realm in use for many MIT hosts.
The easiest way to do this would be to have a translation table from
domain names to Kerberos realms for those hosts whose realm != domain.
An open question is whether the table should be compiled into the
library function or disk-resident in a configuration file. (The latter
is much more flexible, but may be prone to spoofing. comments?)
I propose the following function for the Kerberos library:
/*
* krb_getrealm. Given a fully-qualified domain-style primary host name,
* return the name of the Kerberos realm for the host.
*/
char *
krb_getrealm(host)
char *host;
{
take domain portion of hostname
compare with a table of translations, translating if necessary:
MIT.EDU -> ATHENA.MIT.EDU
*.CMU.EDU -> CMU.EDU
etc.
return the domain name or translated name
}