KRB5_PRINCIPAL(3) UNIX Programmer's Manual KRB5_PRINCIPAL(3) NNAAMMEE kkrrbb55__ssnnaammee__ttoo__pprriinncciippaall, kkrrbb55__ssoocckk__ttoo__pprriinncciippaall - create a service prin- cipal LLIIBBRRAARRYY Kerberos 5 Library (libkrb5, -lkrb5) SSYYNNOOPPSSIISS _k_r_b_5___e_r_r_o_r___c_o_d_e kkrrbb55__ssnnaammee__ttoo__pprriinncciippaall(_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_n_a_m_e, _c_o_n_s_t _c_h_a_r _*_s_n_a_m_e, _i_n_t_3_2___t _t_y_p_e, _k_r_b_5___p_r_i_n_c_i_p_a_l _*_p_r_i_n_c_i_p_a_l) _k_r_b_5___e_r_r_o_r___c_o_d_e kkrrbb55__ssoocckk__ttoo__pprriinncciippaall(_k_r_b_5___c_o_n_t_e_x_t _c_o_n_t_e_x_t, _i_n_t _s_o_c_k_e_t, _c_o_n_s_t _c_h_a_r _*_s_n_a_m_e, _i_n_t_3_2___t _t_y_p_e, _k_r_b_5___p_r_i_n_c_i_p_a_l _*_p_r_i_n_c_i_p_a_l) DDEESSCCRRIIPPTTIIOONN These functions create a ``service'' principal that can, for instance, be used to lookup a key in a keytab. For both these function the _s_n_a_m_e pa- rameter will be used for the first component of the created principal. If _s_n_a_m_e is NULL, ``host'' will be used instead. kkrrbb55__ssnnaammee__ttoo__pprriinncciippaall() will use the passed _h_o_s_t_n_a_m_e for the second component. If type KRB5_NT_SRV_HST this name will be looked up with ggeetthhoossttbbyynnaammee(). If _h_o_s_t_n_a_m_e _i_s NULL, the local hostname will be used. kkrrbb55__ssoocckk__ttoo__pprriinncciippaall() will use the ``sockname'' of the passed _s_o_c_k_e_t, which should be a bound AF_INET socket. SSEEEE AALLSSOO krb5_425_conv_principal(3), krb5_build_principal(3), krb5_free_principal(3), krb5_parse_name(3), krb5_unparse_name(3) HEIMDAL August 8, 1997 1