
KRB5_COMPARE_CREDS(3)      UNIX Programmer's Manual      KRB5_COMPARE_CREDS(3)

NNAAMMEE
     kkrrbb55__ccoommppaarree__ccrreeddss - compare Kerberos 5 credentials

LLIIBBRRAARRYY
     Kerberos 5 Library (libkrb5, -lkrb5)

SSYYNNOOPPSSIISS
     _k_r_b_5___b_o_o_l_e_a_n
     kkrrbb55__ccoommppaarree__ccrreeddss(_k_r_b_5___c_o_n_t_e_x_t _c_o_n_t_e_x_t, _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, _c_o_n_s_t _k_r_b_5___c_r_e_d_s _*_c_r_e_d_s)

DDEESSCCRRIIPPTTIIOONN
     kkrrbb55__ccoommppaarree__ccrreeddss() compares _m_c_r_e_d_s (usually filled in by the applica-
     tion) to _c_r_e_d_s (most often from a credentials cache) and return TRUE if
     they are equal.  Unless _m_c_r_e_d_s_-_>_s_e_r_v_e_r is NULL, the service of the cre-
     dentials are always compared.  If the client name in _m_c_r_e_d_s is present,
     the client names are also compared. This function is normally only called
     indirectly via krb5_cc_retrieve_cred(3).

     The following flags, set in _w_h_i_c_h_f_i_e_l_d_s, affects the comparison:
           KRB5_TC_MATCH_SRV_NAMEONLY  Consider all realms equal when compar-
                                       ing the service principal.
           KRB5_TC_MATCH_KEYTYPE       Compare enctypes.
           KRB5_TC_MATCH_FLAGS_EXACT   Make sure that the ticket flags are
                                       identical.
           KRB5_TC_MATCH_FLAGS         Make sure that all ticket flags set in
                                       _m_c_r_e_d_s are also present  in _c_r_e_d_s.
           KRB5_TC_MATCH_TIMES_EXACT   Compares the ticket times exactly.
           KRB5_TC_MATCH_TIMES         Compares only the expiration times of
                                       the creds.
           KRB5_TC_MATCH_AUTHDATA      Compares the authdata fields.
           KRB5_TC_MATCH_2ND_TKT       Compares the second tickets (used by
                                       user-to-user authentication).
           KRB5_TC_MATCH_IS_SKEY       Compares the existance of the second
                                       ticket.

SSEEEE AALLSSOO
     krb5(3),  krb5_cc_retrieve_cred(3),  krb5_creds(3),
     krb5_get_init_creds(3),  kerberos(8)

 HEIMDAL                         May 10, 2005                                1
