add functions `krb5_principal_get_realm' and
`krb5_principal_get_comp_string' that returns parts of a principal; this is a replacement for the internal `krb5_princ_realm' and `krb5_princ_component' macros that everyone seem to use git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@10136 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
@@ -59,6 +59,23 @@ krb5_free_principal(krb5_context context,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const char *
|
||||||
|
krb5_principal_get_realm(krb5_context context,
|
||||||
|
krb5_principal principal)
|
||||||
|
{
|
||||||
|
return princ_realm(principal);
|
||||||
|
}
|
||||||
|
|
||||||
|
const char *
|
||||||
|
krb5_principal_get_comp_string(krb5_context context,
|
||||||
|
krb5_principal principal,
|
||||||
|
unsigned int component)
|
||||||
|
{
|
||||||
|
if(component >= princ_num_comp(principal))
|
||||||
|
return NULL;
|
||||||
|
return princ_ncomp(principal, component);
|
||||||
|
}
|
||||||
|
|
||||||
krb5_error_code
|
krb5_error_code
|
||||||
krb5_parse_name(krb5_context context,
|
krb5_parse_name(krb5_context context,
|
||||||
const char *name,
|
const char *name,
|
||||||
|
Reference in New Issue
Block a user