KRB5_SET_DEFAULT_REALM(3) UNIX Programmer's Manual KRB5_SET_DEFAULT_REALM(3) NNAAMMEE kkrrbb55__ffrreeee__hhoosstt__rreeaallmm kkrrbb55__ggeett__ddeeffaauulltt__rreeaallmm kkrrbb55__ggeett__ddeeffaauulltt__rreeaallmmss kkrrbb55__ggeett__hhoosstt__rreeaallmm kkrrbb55__sseett__ddeeffaauulltt__rreeaallmm - default and host realm read and manipulation routines LLIIBBRRAARRYY Kerberos 5 Library (libkrb5, -lkrb5) SSYYNNOOPPSSIISS _k_r_b_5___e_r_r_o_r___c_o_d_e kkrrbb55__ffrreeee__hhoosstt__rreeaallmm(_k_r_b_5___c_o_n_t_e_x_t _c_o_n_t_e_x_t, _k_r_b_5___r_e_a_l_m _*_r_e_a_l_m_l_i_s_t) _k_r_b_5___e_r_r_o_r___c_o_d_e kkrrbb55__ggeett__ddeeffaauulltt__rreeaallmm(_k_r_b_5___c_o_n_t_e_x_t _c_o_n_t_e_x_t, _k_r_b_5___r_e_a_l_m _*_r_e_a_l_m) _k_r_b_5___e_r_r_o_r___c_o_d_e kkrrbb55__ggeett__ddeeffaauulltt__rreeaallmmss(_k_r_b_5___c_o_n_t_e_x_t _c_o_n_t_e_x_t, _k_r_b_5___r_e_a_l_m _*_*_r_e_a_l_m) _k_r_b_5___e_r_r_o_r___c_o_d_e kkrrbb55__ggeett__hhoosstt__rreeaallmm(_k_r_b_5___c_o_n_t_e_x_t _c_o_n_t_e_x_t, _c_o_n_s_t _c_h_a_r _*_h_o_s_t, _k_r_b_5___r_e_a_l_m _*_*_r_e_a_l_m_s) _k_r_b_5___e_r_r_o_r___c_o_d_e kkrrbb55__sseett__ddeeffaauulltt__rreeaallmm(_k_r_b_5___c_o_n_t_e_x_t _c_o_n_t_e_x_t, _c_o_n_s_t _c_h_a_r _*_r_e_a_l_m) DDEESSCCRRIIPPTTIIOONN kkrrbb55__ffrreeee__hhoosstt__rreeaallmm() frees all memory allocated by _r_e_a_l_m_l_i_s_t. kkrrbb55__ggeett__ddeeffaauulltt__rreeaallmm() returns the first default realm for this host. The realm returned should be free with ffrreeee(). kkrrbb55__ggeett__ddeeffaauulltt__rreeaallmmss() returns a NULL terminated list of default realms for this context. Realms returned by kkrrbb55__ggeett__ddeeffaauulltt__rreeaallmmss() should be free with kkrrbb55__ffrreeee__hhoosstt__rreeaallmm(). kkrrbb55__ggeett__hhoosstt__rreeaallmm() returns a NULL terminated list of realms for _h_o_s_t by looking up the information in the [domain_realm] in _k_r_b_5_._c_o_n_f 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, kkrrbb55__ggeett__hhoosstt__rreeaallmm() 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, kkrrbb55__ggeett__hhoosstt__rreeaallmm() assumes it can use the domain part of the _h_o_s_t to form a realm. kkrrbb55__sseett__ddeeffaauulltt__rreeaallmm() sets the default realm for the _c_o_n_t_e_x_t. If NULL is used as a _r_e_a_l_m, the [libdefaults]default_realm stanza in _k_r_b_5_._c_o_n_f is used. If there is no such stanza in the configuration file, the kkrrbb55__ggeett__hhoosstt__rreeaallmm() function is used to form a default realm. SSEEEE AALLSSOO krb5.conf(5), free(3) HEIMDAL Mar 16, 2003 1