KRB5_BUILD_PRINCIPAL(3) UNIX Programmer's Manual KRB5_BUILD_PRINCIPAL(3) NNAAMMEE kkrrbb55__bbuuiilldd__pprriinncciippaall, kkrrbb55__bbuuiilldd__pprriinncciippaall__eexxtt, kkrrbb55__bbuuiilldd__pprriinncciippaall__vvaa, kkrrbb55__bbuuiilldd__pprriinncciippaall__vvaa__eexxtt, kkrrbb55__mmaakkee__pprriinncciippaall - principal creation functions LLIIBBRRAARRYY Kerberos 5 Library (libkrb5, -lkrb5) SSYYNNOOPPSSIISS _k_r_b_5___e_r_r_o_r___c_o_d_e kkrrbb55__bbuuiilldd__pprriinncciippaall(_k_r_b_5___c_o_n_t_e_x_t _c_o_n_t_e_x_t, _k_r_b_5___p_r_i_n_c_i_p_a_l _*_p_r_i_n_c_i_p_a_l, _i_n_t _r_e_a_l_m___l_e_n, _k_r_b_5___c_o_n_s_t___r_e_a_l_m _r_e_a_l_m, _._._.) _k_r_b_5___e_r_r_o_r___c_o_d_e kkrrbb55__bbuuiilldd__pprriinncciippaall__eexxtt(_k_r_b_5___c_o_n_t_e_x_t _c_o_n_t_e_x_t, _k_r_b_5___p_r_i_n_c_i_p_a_l _*_p_r_i_n_c_i_p_a_l, _i_n_t _r_e_a_l_m___l_e_n, _k_r_b_5___c_o_n_s_t___r_e_a_l_m _r_e_a_l_m, _._._.) _k_r_b_5___e_r_r_o_r___c_o_d_e kkrrbb55__bbuuiilldd__pprriinncciippaall__vvaa(_k_r_b_5___c_o_n_t_e_x_t _c_o_n_t_e_x_t, _k_r_b_5___p_r_i_n_c_i_p_a_l _*_p_r_i_n_c_i_p_a_l, _i_n_t _r_e_a_l_m___l_e_n, _k_r_b_5___c_o_n_s_t___r_e_a_l_m _r_e_a_l_m, _v_a___l_i_s_t _a_p) _k_r_b_5___e_r_r_o_r___c_o_d_e kkrrbb55__bbuuiilldd__pprriinncciippaall__vvaa__eexxtt(_k_r_b_5___c_o_n_t_e_x_t _c_o_n_t_e_x_t, _k_r_b_5___p_r_i_n_c_i_p_a_l _*_p_r_i_n_c_i_p_a_l, _i_n_t _r_e_a_l_m___l_e_n, _k_r_b_5___c_o_n_s_t___r_e_a_l_m _r_e_a_l_m, _v_a___l_i_s_t _a_p) _k_r_b_5___e_r_r_o_r___c_o_d_e kkrrbb55__mmaakkee__pprriinncciippaall(_k_r_b_5___c_o_n_t_e_x_t _c_o_n_t_e_x_t, _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___c_o_n_s_t___r_e_a_l_m _r_e_a_l_m, _._._.) DDEESSCCRRIIPPTTIIOONN These functions create a Kerberos 5 principal from a realm and a list of components. All of these functions return an allocated principal in the _p_r_i_n_c_i_p_a_l parameter, this should be freed with kkrrbb55__ffrreeee__pprriinncciippaall() af- ter use. The ``build'' functions take a _r_e_a_l_m and the length of the realm. The kkrrbb55__bbuuiilldd__pprriinncciippaall() and kkrrbb55__bbuuiilldd__pprriinncciippaall__vvaa() also takes a list of components (zero-terminated strings), terminated with NULL. The kkrrbb55__bbuuiilldd__pprriinncciippaall__eexxtt() and kkrrbb55__bbuuiilldd__pprriinncciippaall__vvaa__eexxtt() takes a list of length-value pairs, the list is terminated with a zero length. The kkrrbb55__mmaakkee__pprriinncciippaall() is a wrapper around kkrrbb55__bbuuiilldd__pprriinncciippaall(). If the realm is NULL, the default realm will be used. BBUUGGSS You can not have a NUL in a component. Until someone can give a good ex- ample of where it would be a good idea to have NUL's in a component, this will not be fixed. SSEEEE AALLSSOO krb5_425_conv_principal(3), krb5_free_principal(3), krb5_parse_name(3), krb5_sname_to_principal(3), krb5_unparse_name(3) HEIMDAL August 8, 1997 1