1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69
|
KRB5_SET_DEFAULT_REAL... BSD Library Functions Manual KRB5_SET_DEFAULT_REAL...
NNAAMMEE
kkrrbb55__ccooppyy__hhoosstt__rreeaallmm, 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
##iinncclluuddee <<kkrrbb55..hh>>
_k_r_b_5___e_r_r_o_r___c_o_d_e
kkrrbb55__ccooppyy__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 _k_r_b_5___r_e_a_l_m _*_f_r_o_m,
_k_r_b_5___r_e_a_l_m _*_*_t_o);
_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__ccooppyy__hhoosstt__rreeaallmm() copies the list of realms from _f_r_o_m to _t_o. _t_o
should be freed by the caller using _k_r_b_5___f_r_e_e___h_o_s_t___r_e_a_l_m.
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 freed with kkrrbb55__xxffrreeee().
kkrrbb55__ggeett__ddeeffaauulltt__rreeaallmmss() returns a NULL terminated list of default
realms for this context. Realms returned by kkrrbb55__ggeett__ddeeffaauulltt__rreeaallmmss()
should be freed 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. Caller must free _r_e_a_l_m_l_i_s_t with kkrrbb55__ffrreeee__hhoosstt__rreeaallmm().
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
free(3), krb5.conf(5)
HEIMDAL April 24, 2005 HEIMDAL
|