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
|
KRB5_GET_KRBHST(3) BSD Library Functions Manual KRB5_GET_KRBHST(3)
NNAAMMEE
kkrrbb55__ggeett__kkrrbbhhsstt, kkrrbb55__ggeett__kkrrbb__aaddmmiinn__hhsstt, kkrrbb55__ggeett__kkrrbb__cchhaannggeeppww__hhsstt,
kkrrbb55__ggeett__kkrrbb552244hhsstt, kkrrbb55__ffrreeee__kkrrbbhhsstt -- lookup Kerberos KDC hosts
LLIIBBRRAARRYY
Kerberos 5 Library (libkrb5, -lkrb5)
SSYYNNOOPPSSIISS
##iinncclluuddee <<kkrrbb55..hh>>
_k_r_b_5___e_r_r_o_r___c_o_d_e
kkrrbb55__ggeett__kkrrbbhhsstt(_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 _*_r_e_a_l_m,
_c_h_a_r _*_*_*_h_o_s_t_l_i_s_t);
_k_r_b_5___e_r_r_o_r___c_o_d_e
kkrrbb55__ggeett__kkrrbb__aaddmmiinn__hhsstt(_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 _*_r_e_a_l_m,
_c_h_a_r _*_*_*_h_o_s_t_l_i_s_t);
_k_r_b_5___e_r_r_o_r___c_o_d_e
kkrrbb55__ggeett__kkrrbb__cchhaannggeeppww__hhsstt(_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 _*_r_e_a_l_m,
_c_h_a_r _*_*_*_h_o_s_t_l_i_s_t);
_k_r_b_5___e_r_r_o_r___c_o_d_e
kkrrbb55__ggeett__kkrrbb552244hhsstt(_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 _*_r_e_a_l_m,
_c_h_a_r _*_*_*_h_o_s_t_l_i_s_t);
_k_r_b_5___e_r_r_o_r___c_o_d_e
kkrrbb55__ffrreeee__kkrrbbhhsstt(_k_r_b_5___c_o_n_t_e_x_t _c_o_n_t_e_x_t, _c_h_a_r _*_*_h_o_s_t_l_i_s_t);
DDEESSCCRRIIPPTTIIOONN
These functions implement the old API to get a list of Kerberos hosts,
and are thus similar to the kkrrbb55__kkrrbbhhsstt__iinniitt() functions. However, since
these functions returns _a_l_l hosts in one go, they potentially have to do
more lookups than necessary. These functions remain for compatibility
reasons.
After a call to one of these functions, _h_o_s_t_l_i_s_t is a NULL terminated
list of strings, pointing to the requested Kerberos hosts. These should
be freed with kkrrbb55__ffrreeee__kkrrbbhhsstt() when done with.
EEXXAAMMPPLLEESS
The following code will print the KDCs of the realm ``MY.REALM''.
char **hosts, **p;
krb5_get_krbhst(context, "MY.REALM", &hosts);
for(p = hosts; *p; p++)
printf("%s\n", *p);
krb5_free_krbhst(context, hosts);
SSEEEE AALLSSOO
krb5_krbhst_init(3)
HEIMDAL April 24, 2005 HEIMDAL
|