add krb5_principal_is_krbtgt

This commit is contained in:
Love Hornquist Astrand
2010-03-07 01:00:48 -08:00
parent a46bc97443
commit 71150bb1bc
2 changed files with 15 additions and 0 deletions

View File

@@ -1551,3 +1551,17 @@ krb5_parse_nametype(krb5_context context, const char *str, int32_t *nametype)
N_("Failed to find name type %s", ""), str);
return KRB5_PARSE_MALFORMED;
}
/**
* Check if the cname part of the principal is a krbtgt principal
*
* @ingroup krb5_principal
*/
krb5_boolean
krb5_principal_is_krbtgt(krb5_context context, krb5_const_principal p)
{
return p->name.name_string.len == 2 &&
strcmp(p->name.name_string.val[0], KRB5_TGS_NAME) == 0;
}

View File

@@ -485,6 +485,7 @@ HEIMDAL_KRB5_2.0 {
krb5_principal_match;
krb5_principal_set_realm;
krb5_principal_set_type;
krb5_principal_is_krbtgt;
krb5_print_address;
krb5_program_setup;
krb5_prompter_posix;