| 1 |
|
|---|
| 2 | KRB5_GET_KRBHST(3) BSD Library Functions Manual KRB5_GET_KRBHST(3)
|
|---|
| 3 |
|
|---|
| 4 | NNAAMMEE
|
|---|
| 5 | kkrrbb55__ggeett__kkrrbbhhsstt, kkrrbb55__ggeett__kkrrbb__aaddmmiinn__hhsstt, kkrrbb55__ggeett__kkrrbb__cchhaannggeeppww__hhsstt,
|
|---|
| 6 | kkrrbb55__ggeett__kkrrbb552244hhsstt, kkrrbb55__ffrreeee__kkrrbbhhsstt -- lookup Kerberos KDC hosts
|
|---|
| 7 |
|
|---|
| 8 | LLIIBBRRAARRYY
|
|---|
| 9 | Kerberos 5 Library (libkrb5, -lkrb5)
|
|---|
| 10 |
|
|---|
| 11 | SSYYNNOOPPSSIISS
|
|---|
| 12 | ##iinncclluuddee <<kkrrbb55..hh>>
|
|---|
| 13 |
|
|---|
| 14 | _k_r_b_5___e_r_r_o_r___c_o_d_e
|
|---|
| 15 | 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,
|
|---|
| 16 | _c_h_a_r _*_*_*_h_o_s_t_l_i_s_t);
|
|---|
| 17 |
|
|---|
| 18 | _k_r_b_5___e_r_r_o_r___c_o_d_e
|
|---|
| 19 | 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,
|
|---|
| 20 | _c_h_a_r _*_*_*_h_o_s_t_l_i_s_t);
|
|---|
| 21 |
|
|---|
| 22 | _k_r_b_5___e_r_r_o_r___c_o_d_e
|
|---|
| 23 | 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,
|
|---|
| 24 | _c_h_a_r _*_*_*_h_o_s_t_l_i_s_t);
|
|---|
| 25 |
|
|---|
| 26 | _k_r_b_5___e_r_r_o_r___c_o_d_e
|
|---|
| 27 | 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,
|
|---|
| 28 | _c_h_a_r _*_*_*_h_o_s_t_l_i_s_t);
|
|---|
| 29 |
|
|---|
| 30 | _k_r_b_5___e_r_r_o_r___c_o_d_e
|
|---|
| 31 | 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);
|
|---|
| 32 |
|
|---|
| 33 | DDEESSCCRRIIPPTTIIOONN
|
|---|
| 34 | These functions implement the old API to get a list of Kerberos hosts,
|
|---|
| 35 | and are thus similar to the kkrrbb55__kkrrbbhhsstt__iinniitt() functions. However, since
|
|---|
| 36 | these functions returns _a_l_l hosts in one go, they potentially have to do
|
|---|
| 37 | more lookups than necessary. These functions remain for compatibility
|
|---|
| 38 | reasons.
|
|---|
| 39 |
|
|---|
| 40 | After a call to one of these functions, _h_o_s_t_l_i_s_t is a NULL terminated
|
|---|
| 41 | list of strings, pointing to the requested Kerberos hosts. These should
|
|---|
| 42 | be freed with kkrrbb55__ffrreeee__kkrrbbhhsstt() when done with.
|
|---|
| 43 |
|
|---|
| 44 | EEXXAAMMPPLLEESS
|
|---|
| 45 | The following code will print the KDCs of the realm ``MY.REALM''.
|
|---|
| 46 |
|
|---|
| 47 | char **hosts, **p;
|
|---|
| 48 | krb5_get_krbhst(context, "MY.REALM", &hosts);
|
|---|
| 49 | for(p = hosts; *p; p++)
|
|---|
| 50 | printf("%s\n", *p);
|
|---|
| 51 | krb5_free_krbhst(context, hosts);
|
|---|
| 52 |
|
|---|
| 53 | SSEEEE AALLSSOO
|
|---|
| 54 | krb5_krbhst_init(3)
|
|---|
| 55 |
|
|---|
| 56 | HEIMDAL April 24, 2005 HEIMDAL
|
|---|