carta
krb5_get_default_realm(3)

krb5_get_default_realm3

Default and host realm read and manipulation routines

Usage

krb5_error_code

krb5_error_code

krb5_error_code

krb5_error_code

krb5_error_code

krb5_error_code

Library

Kerberos 5 Library (libkrb5, -lkrb5)

Overview

krb5_copy_host_realm() copies the list of realms from from to to. to should be freed by the caller using krb5_free_host_realm.

krb5_free_host_realm() frees all memory allocated by realmlist.

krb5_get_default_realm() returns the first default realm for this host. The realm returned should be freed with krb5_xfree().

krb5_get_default_realms() returns a NULL terminated list of default realms for this context. Realms returned by krb5_get_default_realms() should be freed with krb5_free_host_realm().

krb5_get_host_realm() returns a NULL terminated list of realms for host by looking up the information in the [domain_realm] in krb5.conf or in DNS. If the mapping in [domain_realm] results in the string dns_locate, DNS is used to lookup the realm.

When using DNS to a resolve the domain for the host a.b.c, krb5_get_host_realm() looks for a TXT resource record named _kerberos.a.b.c, and if not found, it strips off the first component and tries a again (_kerberos.b.c) until it reaches the root.

If there is no configuration or DNS information found, krb5_get_host_realm() assumes it can use the domain part of the host to form a realm. Caller must free realmlist with krb5_free_host_realm().

krb5_set_default_realm() sets the default realm for the context. If NULL is used as a realm, the [libdefaults]default_realm stanza in krb5.conf is used. If there is no such stanza in the configuration file, the krb5_get_host_realm() function is used to form a default realm.

History

  • Debian 13 (Trixie) to Debian 8 (Jessie): the text shown here
  • Debian 7 (Wheezy) to Debian 6.0 (Squeeze)
  • Debian 5.0 (Lenny)
  • Debian 4.0 (Etch)
  • Debian 3.1 (Sarge)

From heimdal-dev 7.8.git20221117.28daf24+dfsg-9+deb13u1 in Debian 13 (Trixie). Parsed by carta from the page's mdoc source.