KRB5_CCACHE(3) UNIX Programmer's Manual KRB5_CCACHE(3) NNAAMMEE kkrrbb55__ccccaacchhee, kkrrbb55__cccc__ccuurrssoorr, kkrrbb55__cccc__ooppss, kkrrbb55__ffcccc__ooppss, kkrrbb55__mmcccc__ooppss, kkrrbb55__cccc__cclloossee, kkrrbb55__cccc__ccooppyy__ccaacchhee, kkrrbb55__cccc__ddeeffaauulltt, kkrrbb55__cccc__ddeeffaauulltt__nnaammee, kkrrbb55__cccc__ddeessttrrooyy, kkrrbb55__cccc__eenndd__sseeqq__ggeett, kkrrbb55__cccc__ggeenn__nneeww, kkrrbb55__cccc__ggeett__nnaammee, kkrrbb55__cccc__ggeett__pprriinncciippaall, kkrrbb55__cccc__ggeett__ttyyppee, kkrrbb55__cccc__ggeett__ooppss, kkrrbb55__cccc__ggeett__vveerrssiioonn, kkrrbb55__cccc__iinniittiiaalliizzee, kkrrbb55__cccc__rreeggiisstteerr, kkrrbb55__cccc__rreessoollvvee, kkrrbb55__cccc__rreettrriieevvee__ccrreedd, kkrrbb55__cccc__rreemmoovvee__ccrreedd, kkrrbb55__cccc__sseett__ddeeffaauulltt__nnaammee, kkrrbb55__cccc__ssttoorree__ccrreedd, kkrrbb55__cccc__sseett__ffllaaggss, kkrrbb55__cccc__nneexxtt__ccrreedd - mange credential cache. LLIIBBRRAARRYY Kerberos 5 Library (libkrb5, -lkrb5) SSYYNNOOPPSSIISS struct krb5_ccache; struct krb5_cc_cursor; struct krb5_cc_ops; struct krb5_cc_ops *krb5_fcc_ops; struct krb5_cc_ops *krb5_mcc_ops; _k_r_b_5___e_r_r_o_r___c_o_d_e kkrrbb55__cccc__cclloossee(_k_r_b_5___c_o_n_t_e_x_t _*_c_o_n_t_e_x_t, _k_r_b_5___c_c_a_c_h_e _i_d) _k_r_b_5___e_r_r_o_r___c_o_d_e kkrrbb55__cccc__ccooppyy__ccaacchhee(_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___c_c_a_c_h_e _f_r_o_m, _k_r_b_5___c_c_a_c_h_e _t_o) _k_r_b_5___e_r_r_o_r___c_o_d_e kkrrbb55__cccc__ddeeffaauulltt(_k_r_b_5___c_o_n_t_e_x_t _*_c_o_n_t_e_x_t, _k_r_b_5___c_c_a_c_h_e _*_i_d) _c_o_n_s_t _c_h_a_r _* kkrrbb55__cccc__ddeeffaauulltt__nnaammee(_k_r_b_5___c_o_n_t_e_x_t _*_c_o_n_t_e_x_t) _k_r_b_5___e_r_r_o_r___c_o_d_e kkrrbb55__cccc__ddeessttrrooyy(_k_r_b_5___c_o_n_t_e_x_t _*_c_o_n_t_e_x_t, _k_r_b_5___c_c_a_c_h_e _i_d) _k_r_b_5___e_r_r_o_r___c_o_d_e kkrrbb55__cccc__eenndd__sseeqq__ggeett(_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___c_c_a_c_h_e _i_d, _k_r_b_5___c_c___c_u_r_s_o_r _*_c_u_r_s_o_r) _k_r_b_5___e_r_r_o_r___c_o_d_e kkrrbb55__cccc__ggeenn__nneeww(_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___c_c___o_p_s _*_o_p_s, _k_r_b_5___c_c_a_c_h_e _*_i_d) _c_o_n_s_t _c_h_a_r _* kkrrbb55__cccc__ggeett__nnaammee(_k_r_b_5___c_o_n_t_e_x_t _*_c_o_n_t_e_x_t, _k_r_b_5___c_c_a_c_h_e _i_d) _k_r_b_5___e_r_r_o_r___c_o_d_e kkrrbb55__cccc__ggeett__pprriinncciippaall(_k_r_b_5___c_o_n_t_e_x_t _*_c_o_n_t_e_x_t, _k_r_b_5___c_c_a_c_h_e _i_d, _k_r_b_5___p_r_i_n_c_i_p_a_l _*_p_r_i_n_c_i_p_a_l) _c_o_n_s_t _c_h_a_r _* kkrrbb55__cccc__ggeett__ttyyppee(_k_r_b_5___c_o_n_t_e_x_t _*_c_o_n_t_e_x_t, _k_r_b_5___c_c_a_c_h_e _i_d) _c_o_n_s_t _k_r_b_5___c_c___o_p_s _* kkrrbb55__cccc__ggeett__ooppss(_k_r_b_5___c_o_n_t_e_x_t _*_c_o_n_t_e_x_t, _k_r_b_5___c_c_a_c_h_e _i_d) _k_r_b_5___e_r_r_o_r___c_o_d_e kkrrbb55__cccc__ggeett__vveerrssiioonn(_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___c_c_a_c_h_e _i_d) _k_r_b_5___e_r_r_o_r___c_o_d_e kkrrbb55__cccc__iinniittiiaalliizzee(_k_r_b_5___c_o_n_t_e_x_t _*_c_o_n_t_e_x_t, _k_r_b_5___c_c_a_c_h_e _i_d, _k_r_b_5___p_r_i_n_c_i_p_a_l _p_r_i_m_a_r_y___p_r_i_n_c_i_p_a_l) _k_r_b_5___e_r_r_o_r___c_o_d_e kkrrbb55__cccc__rreeggiisstteerr(_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___c_c___o_p_s _*_o_p_s, _k_r_b_5___b_o_o_l_e_a_n _o_v_e_r_r_i_d_e) _k_r_b_5___e_r_r_o_r___c_o_d_e kkrrbb55__cccc__rreessoollvvee(_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 _*_n_a_m_e, _k_r_b_5___c_c_a_c_h_e _*_i_d) _k_r_b_5___e_r_r_o_r___c_o_d_e kkrrbb55__cccc__rreettrriieevvee__ccrreedd(_k_r_b_5___c_o_n_t_e_x_t _*_c_o_n_t_e_x_t, _k_r_b_5___c_c_a_c_h_e _i_d, _k_r_b_5___f_l_a_g_s _w_h_i_c_h_f_i_e_l_d_s, _c_o_n_s_t _k_r_b_5___c_r_e_d_s _*_m_c_r_e_d_s, _k_r_b_5___c_r_e_d_s _*_c_r_e_d_s) _k_r_b_5___e_r_r_o_r___c_o_d_e kkrrbb55__cccc__rreemmoovvee__ccrreedd(_k_r_b_5___c_o_n_t_e_x_t _*_c_o_n_t_e_x_t, _k_r_b_5___c_c_a_c_h_e _i_d, _k_r_b_5___f_l_a_g_s _w_h_i_c_h, _k_r_b_5___c_r_e_d_s _*_c_r_e_d) _k_r_b_5___e_r_r_o_r___c_o_d_e kkrrbb55__cccc__sseett__ddeeffaauulltt__nnaammee(_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 _*_n_a_m_e) _k_r_b_5___e_r_r_o_r___c_o_d_e kkrrbb55__cccc__ssttoorree__ccrreedd(_k_r_b_5___c_o_n_t_e_x_t _*_c_o_n_t_e_x_t, _k_r_b_5___c_c_a_c_h_e _i_d, _k_r_b_5___c_r_e_d_s _*_c_r_e_d_s) _k_r_b_5___e_r_r_o_r___c_o_d_e kkrrbb55__cccc__sseett__ffllaaggss(_k_r_b_5___c_o_n_t_e_x_t _*_c_o_n_t_e_x_t, _k_r_b_5___c_c___s_e_t___f_l_a_g_s _i_d, _k_r_b_5___f_l_a_g_s _f_l_a_g_s) _k_r_b_5___e_r_r_o_r___c_o_d_e kkrrbb55__cccc__nneexxtt__ccrreedd(_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___c_c_a_c_h_e _i_d, _k_r_b_5___c_c___c_u_r_s_o_r _*_c_u_r_s_o_r, _k_r_b_5___c_r_e_d_s _*_c_r_e_d_s) DDEESSCCRRIIPPTTIIOONN The krb5_ccache structure holds a Kerberos credential cache. The krb5_cc_cursor structure holds current position in a credential cache when iterating over the cache. The krb5_cc_ops structure holds a set of operations that can me preformed on a credential cache. There is no component inside krb5_ccache, krb5_cc_cursor nor krb5_fcc_ops that is directly referable. The krb5_creds holds a Kerberos credential, see manpage for krb5_creds(3). kkrrbb55__cccc__ddeeffaauulltt__nnaammee() and kkrrbb55__cccc__sseett__ddeeffaauulltt__nnaammee() gets and sets the default name for the _c_o_n_t_e_x_t. kkrrbb55__cccc__ddeeffaauulltt() opens the default ccache in _i_d. Return 0 or an error code. kkrrbb55__cccc__ggeenn__nneeww() generates a new ccache of type _o_p_s in _i_d. Return 0 or an error code. kkrrbb55__cccc__rreessoollvvee() finds and allocates a ccache in _i_d from the specifica- tion in _r_e_s_i_d_u_a_l. If the ccache name doesn't contain any colon (:), in- terpret it as a file name. Return 0 or an error code. kkrrbb55__cccc__iinniittiiaalliizzee() creates a new ccache in _i_d for _p_r_i_m_a_r_y___p_r_i_n_c_i_p_a_l. Return 0 or an error code. kkrrbb55__cccc__cclloossee() stops using the ccache _i_d and frees the related re- sources. Return 0 or an error code. kkrrbb55__cccc__ddeessttrrooyy() removes the ccache and closes (by calling kkrrbb55__cccc__cclloossee()) _i_d. Return 0 or an error code. kkrrbb55__cccc__ccooppyy__ccaacchhee() copys the contents of _f_r_o_m to _t_o. kkrrbb55__cccc__ggeett__nnaammee() returns the name of the ccache _i_d. kkrrbb55__cccc__ggeett__pprriinncciippaall() returns the principal of _i_d in _p_r_i_n_c_i_p_a_l. Return 0 or an error code. kkrrbb55__cccc__ggeett__ttyyppee() returns the type of the ccache _i_d. kkrrbb55__cccc__ggeett__ooppss() returns the ops of the ccache _i_d. kkrrbb55__cccc__ggeett__vveerrssiioonn() returns the version of _i_d. kkrrbb55__cccc__rreeggiisstteerr() Adds a new ccache type with operations _o_p_s, overwrit- ing any existing one if _o_v_e_r_r_i_d_e. Return an error code or 0. kkrrbb55__cccc__rreemmoovvee__ccrreedd() removes the credential identified by (_c_r_e_d, _w_h_i_c_h) from _i_d. kkrrbb55__cccc__ssttoorree__ccrreedd() stores _c_r_e_d_s in the ccache _i_d. Return 0 or an error code. kkrrbb55__cccc__sseett__ffllaaggss() sets the flags of _i_d to _f_l_a_g_s. kkrrbb55__cccc__rreettrriieevvee__ccrreedd(), retrieves the credential identified by _m_c_r_e_d_s (and _w_h_i_c_h_f_i_e_l_d_s) from _i_d in _c_r_e_d_s. Return 0 or an error code. kkrrbb55__cccc__nneexxtt__ccrreedd() retrieves the next cred pointed to by (_i_d, _c_u_r_s_o_r) in _c_r_e_d_s, and advance _c_u_r_s_o_r. Return 0 or an error code. kkrrbb55__cccc__eenndd__sseeqq__ggeett() Destroys the cursor _c_u_r_s_o_r. SSEEEE AALLSSOO krb5(3), krb5.conf(5), kerberos(8) HEIMDAL March 16, 2003 3