diff options
author | Andrew Bartlett <abartlet@samba.org> | 2010-03-27 11:55:22 +1100 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2010-03-27 11:55:22 +1100 |
commit | 533024be44861c8d2c8ba3232738c7d2dbbe2e4f (patch) | |
tree | 048c8bd52b50604e950d7976115ebaf42a0802ed /source4/heimdal/lib/krb5/principal.c | |
parent | 679854384252e698b8f8c09d31eb15ed043c919b (diff) | |
download | samba-533024be44861c8d2c8ba3232738c7d2dbbe2e4f.tar.gz samba-533024be44861c8d2c8ba3232738c7d2dbbe2e4f.tar.bz2 samba-533024be44861c8d2c8ba3232738c7d2dbbe2e4f.zip |
s4:heimdal: import lorikeet-heimdal-201003262338 (commit f4e0dc17709829235f057e0e100d34802d3929ff)
Diffstat (limited to 'source4/heimdal/lib/krb5/principal.c')
-rw-r--r-- | source4/heimdal/lib/krb5/principal.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/source4/heimdal/lib/krb5/principal.c b/source4/heimdal/lib/krb5/principal.c index 00c967a72e..8e6341fd62 100644 --- a/source4/heimdal/lib/krb5/principal.c +++ b/source4/heimdal/lib/krb5/principal.c @@ -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; + +} |