Functions | |
krb5_error_code KRB5_LIB_FUNCTION | krb5_acl_match_string (krb5_context context, const char *string, const char *format,...) |
krb5_error_code KRB5_LIB_FUNCTION | krb5_acl_match_file (krb5_context context, const char *file, const char *format,...) |
krb5_error_code KRB5_LIB_FUNCTION | krb5_config_parse_file_multi (krb5_context context, const char *fname, krb5_config_section **res) |
krb5_error_code KRB5_LIB_FUNCTION | krb5_expand_hostname (krb5_context context, const char *orig_hostname, char **new_hostname) |
krb5_error_code KRB5_LIB_FUNCTION | krb5_expand_hostname_realms (krb5_context context, const char *orig_hostname, char **new_hostname, char ***realms) |
krb5_error_code KRB5_LIB_FUNCTION | krb5_free_host_realm (krb5_context context, krb5_realm *realmlist) |
krb5_error_code | krb5_plugin_register (krb5_context context, enum krb5_plugin_type type, const char *name, void *symbol) |
krb5_error_code KRB5_LIB_FUNCTION krb5_acl_match_file | ( | krb5_context | context, | |
const char * | file, | |||
const char * | format, | |||
... | ||||
) |
krb5_acl_match_file matches ACL format against each line in a file using krb5_acl_match_string(). Lines starting with # are treated like comments and ignored.
context | Kerberos 5 context. | |
file | file with acl listed in the file. | |
format | format to match. | |
... | parameter to format string. |
krb5_error_code KRB5_LIB_FUNCTION krb5_acl_match_string | ( | krb5_context | context, | |
const char * | string, | |||
const char * | format, | |||
... | ||||
) |
krb5_acl_match_string matches ACL format against a string.
The ACL format has three format specifiers: s, f, and r. Each specifier will retrieve one argument from the variable arguments for either matching or storing data. The input string is split up using " " (space) and "\t" (tab) as a delimiter; multiple and "\t" in a row are considered to be the same.
List of format specifiers:
context | Kerberos 5 context | |
string | string to match with | |
format | format to match | |
... | parameter to format string |
char *s; ret = krb5_acl_match_string(context, "foo", "s", "foo"); if (ret) krb5_errx(context, 1, "acl didn't match"); ret = krb5_acl_match_string(context, "foo foo baz/kaka", "ss", "foo", &s, "foo/\\*"); if (ret) { // no need to free(s) on error assert(s == NULL); krb5_errx(context, 1, "acl didn't match"); } free(s);
krb5_error_code KRB5_LIB_FUNCTION krb5_config_parse_file_multi | ( | krb5_context | context, | |
const char * | fname, | |||
krb5_config_section ** | res | |||
) |
Parse a configuration file and add the result into res. This interface can be used to parse several configuration files into one resulting krb5_config_section by calling it repeatably.
context | a Kerberos 5 context. | |
fname | a file name to a Kerberos configuration file | |
res | the returned result, must be free with krb5_free_config_files(). |
If the fname starts with "~/" parse configuration file in the current users home directory. The behavior can be disabled and enabled by calling krb5_set_home_dir_access().
krb5_error_code KRB5_LIB_FUNCTION krb5_expand_hostname | ( | krb5_context | context, | |
const char * | orig_hostname, | |||
char ** | new_hostname | |||
) |
krb5_expand_hostname() tries to make orig_hostname into a more canonical one in the newly allocated space returned in new_hostname.
context | a Keberos context | |
orig_hostname | hostname to canonicalise. | |
new_hostname | output hostname, caller must free hostname with krb5_xfree(). |
krb5_error_code KRB5_LIB_FUNCTION krb5_expand_hostname_realms | ( | krb5_context | context, | |
const char * | orig_hostname, | |||
char ** | new_hostname, | |||
char *** | realms | |||
) |
krb5_expand_hostname_realms() expands orig_hostname to a name we believe to be a hostname in newly allocated space in new_hostname and return the realms new_hostname is believed to belong to in realms.
context | a Keberos context | |
orig_hostname | hostname to canonicalise. | |
new_hostname | output hostname, caller must free hostname with krb5_xfree(). | |
realms | output possible realms, is an array that is terminated with NULL. Caller must free with krb5_free_host_realm(). |
krb5_error_code KRB5_LIB_FUNCTION krb5_free_host_realm | ( | krb5_context | context, | |
krb5_realm * | realmlist | |||
) |
Free all memory allocated by `realmlist'
context | A Kerberos 5 context. | |
realmlist | realmlist to free, NULL is ok |
krb5_error_code krb5_plugin_register | ( | krb5_context | context, | |
enum krb5_plugin_type | type, | |||
const char * | name, | |||
void * | symbol | |||
) |
Register a plugin symbol name of specific type.
context | a Keberos context | |
type | type of plugin symbol | |
name | name of plugin symbol | |
symbol | a pointer to the named symbol |