Functions | |
void KRB5_LIB_FUNCTION | krb5_free_principal (krb5_context context, krb5_principal p) |
void KRB5_LIB_FUNCTION | krb5_principal_set_type (krb5_context context, krb5_principal principal, int type) |
unsigned int KRB5_LIB_FUNCTION | krb5_principal_get_num_comp (krb5_context context, krb5_const_principal principal) |
krb5_error_code KRB5_LIB_FUNCTION | krb5_unparse_name (krb5_context context, krb5_const_principal principal, char **name) |
krb5_error_code KRB5_LIB_FUNCTION | krb5_unparse_name_flags (krb5_context context, krb5_const_principal principal, int flags, char **name) |
krb5_boolean KRB5_LIB_FUNCTION | krb5_principal_compare_any_realm (krb5_context context, krb5_const_principal princ1, krb5_const_principal princ2) |
krb5_error_code KRB5_LIB_FUNCTION | krb5_sname_to_principal (krb5_context context, const char *hostname, const char *sname, int32_t type, krb5_principal *ret_princ) |
void KRB5_LIB_FUNCTION krb5_free_principal | ( | krb5_context | context, | |
krb5_principal | p | |||
) |
Frees a Kerberos principal allocated by the library with krb5_parse_name(), krb5_make_principal() or any other related principal functions.
context | A Kerberos context. | |
p | a principal to free. |
krb5_boolean KRB5_LIB_FUNCTION krb5_principal_compare_any_realm | ( | krb5_context | context, | |
krb5_const_principal | princ1, | |||
krb5_const_principal | princ2 | |||
) |
Return TRUE iff princ1 == princ2 (without considering the realm)
context | Kerberos 5 context | |
princ1 | first principal to compare | |
princ2 | second principal to compare |
unsigned int KRB5_LIB_FUNCTION krb5_principal_get_num_comp | ( | krb5_context | context, | |
krb5_const_principal | principal | |||
) |
Get number of component is principal.
context | Kerberos 5 context | |
principal | principal to query |
void KRB5_LIB_FUNCTION krb5_principal_set_type | ( | krb5_context | context, | |
krb5_principal | principal, | |||
int | type | |||
) |
Set the type of the principal
context | A Kerberos context. | |
principal | principal to set the type for | |
type | the new type |
krb5_error_code KRB5_LIB_FUNCTION krb5_sname_to_principal | ( | krb5_context | context, | |
const char * | hostname, | |||
const char * | sname, | |||
int32_t | type, | |||
krb5_principal * | ret_princ | |||
) |
Create a principal for the service running on hostname. If KRB5_NT_SRV_HST is used, the hostname is canonization using DNS (or some other service), this is potentially insecure.
context | A Kerberos context. | |
hostname | hostname to use | |
sname | Service name to use | |
type | name type of pricipal, use KRB5_NT_SRV_HST or KRB5_NT_UNKNOWN. | |
ret_princ | return principal, free with krb5_free_principal(). |
krb5_error_code KRB5_LIB_FUNCTION krb5_unparse_name | ( | krb5_context | context, | |
krb5_const_principal | principal, | |||
char ** | name | |||
) |
Unparse the Kerberos name into a string
context | Kerberos 5 context | |
principal | principal to query | |
name | resulting string, free with krb5_xfree() |
krb5_error_code KRB5_LIB_FUNCTION krb5_unparse_name_flags | ( | krb5_context | context, | |
krb5_const_principal | principal, | |||
int | flags, | |||
char ** | name | |||
) |
Unparse the Kerberos name into a string
context | Kerberos 5 context | |
principal | principal to query | |
flags | flag to determine the behavior | |
name | resulting string, free with krb5_xfree() |