Functions | |
krb5_error_code KRB5_LIB_FUNCTION | krb5_add_et_list (krb5_context context, void(*func)(struct et_list **)) |
krb5_error_code KRB5_LIB_FUNCTION | krb5_set_password (krb5_context context, krb5_creds *creds, const char *newpw, krb5_principal targprinc, int *result_code, krb5_data *result_code_string, krb5_data *result_string) |
krb5_error_code KRB5_LIB_FUNCTION | krb5_init_context (krb5_context *context) |
krb5_error_code KRB5_LIB_FUNCTION | krb5_copy_context (krb5_context context, krb5_context *out) |
void KRB5_LIB_FUNCTION | krb5_free_context (krb5_context context) |
krb5_error_code KRB5_LIB_FUNCTION | krb5_set_config_files (krb5_context context, char **filenames) |
krb5_error_code KRB5_LIB_FUNCTION | krb5_prepend_config_files_default (const char *filelist, char ***pfilenames) |
krb5_error_code KRB5_LIB_FUNCTION | krb5_get_default_config_files (char ***pfilenames) |
void KRB5_LIB_FUNCTION | krb5_free_config_files (char **filenames) |
const krb5_enctype *KRB5_LIB_FUNCTION | krb5_kerberos_enctypes (krb5_context context) |
krb5_error_code KRB5_LIB_FUNCTION | krb5_set_default_in_tkt_etypes (krb5_context context, const krb5_enctype *etypes) |
krb5_error_code KRB5_LIB_FUNCTION | krb5_get_default_in_tkt_etypes (krb5_context context, krb5_enctype **etypes) |
const char *KRB5_LIB_FUNCTION | krb5_get_err_text (krb5_context context, krb5_error_code code) |
void KRB5_LIB_FUNCTION | krb5_init_ets (krb5_context context) |
void KRB5_LIB_FUNCTION | krb5_set_use_admin_kdc (krb5_context context, krb5_boolean flag) |
krb5_boolean KRB5_LIB_FUNCTION | krb5_get_use_admin_kdc (krb5_context context) |
krb5_error_code KRB5_LIB_FUNCTION | krb5_add_extra_addresses (krb5_context context, krb5_addresses *addresses) |
krb5_error_code KRB5_LIB_FUNCTION | krb5_set_extra_addresses (krb5_context context, const krb5_addresses *addresses) |
krb5_error_code KRB5_LIB_FUNCTION | krb5_get_extra_addresses (krb5_context context, krb5_addresses *addresses) |
krb5_error_code KRB5_LIB_FUNCTION | krb5_add_ignore_addresses (krb5_context context, krb5_addresses *addresses) |
krb5_error_code KRB5_LIB_FUNCTION | krb5_set_ignore_addresses (krb5_context context, const krb5_addresses *addresses) |
krb5_error_code KRB5_LIB_FUNCTION | krb5_get_ignore_addresses (krb5_context context, krb5_addresses *addresses) |
krb5_error_code KRB5_LIB_FUNCTION | krb5_set_fcache_version (krb5_context context, int version) |
krb5_error_code KRB5_LIB_FUNCTION | krb5_get_fcache_version (krb5_context context, int *version) |
krb5_boolean KRB5_LIB_FUNCTION | krb5_is_thread_safe (void) |
void KRB5_LIB_FUNCTION | krb5_set_dns_canonicalize_hostname (krb5_context context, krb5_boolean flag) |
krb5_boolean KRB5_LIB_FUNCTION | krb5_get_dns_canonicalize_hostname (krb5_context context) |
krb5_error_code KRB5_LIB_FUNCTION | krb5_get_kdc_sec_offset (krb5_context context, int32_t *sec, int32_t *usec) |
krb5_error_code KRB5_LIB_FUNCTION | krb5_set_kdc_sec_offset (krb5_context context, int32_t sec, int32_t usec) |
time_t KRB5_LIB_FUNCTION | krb5_get_max_time_skew (krb5_context context) |
void KRB5_LIB_FUNCTION | krb5_set_max_time_skew (krb5_context context, time_t t) |
krb5_error_code KRB5_LIB_FUNCTION | krb5_init_etype (krb5_context context, unsigned *len, krb5_enctype **val, const krb5_enctype *etypes) |
krb5_error_code KRB5_LIB_FUNCTION | krb5_copy_host_realm (krb5_context context, const krb5_realm *from, krb5_realm **to) |
krb5_error_code KRB5_LIB_FUNCTION | krb5_free_cred_contents (krb5_context context, krb5_creds *c) |
krb5_error_code KRB5_LIB_FUNCTION | krb5_copy_creds_contents (krb5_context context, const krb5_creds *incred, krb5_creds *c) |
krb5_error_code KRB5_LIB_FUNCTION | krb5_copy_creds (krb5_context context, const krb5_creds *incred, krb5_creds **outcred) |
krb5_error_code KRB5_LIB_FUNCTION | krb5_free_creds (krb5_context context, krb5_creds *c) |
krb5_boolean KRB5_LIB_FUNCTION | krb5_compare_creds (krb5_context context, krb5_flags whichfields, const krb5_creds *mcreds, const krb5_creds *creds) |
unsigned long | krb5_creds_get_ticket_flags (krb5_creds *creds) |
void KRB5_LIB_FUNCTION | krb5_data_zero (krb5_data *p) |
void KRB5_LIB_FUNCTION | krb5_data_free (krb5_data *p) |
void KRB5_LIB_FUNCTION | krb5_free_data (krb5_context context, krb5_data *p) |
krb5_error_code KRB5_LIB_FUNCTION | krb5_data_alloc (krb5_data *p, int len) |
krb5_error_code KRB5_LIB_FUNCTION | krb5_data_realloc (krb5_data *p, int len) |
krb5_error_code KRB5_LIB_FUNCTION | krb5_data_copy (krb5_data *p, const void *data, size_t len) |
krb5_error_code KRB5_LIB_FUNCTION | krb5_copy_data (krb5_context context, const krb5_data *indata, krb5_data **outdata) |
int KRB5_LIB_FUNCTION | krb5_data_cmp (const krb5_data *data1, const krb5_data *data2) |
void KRB5_LIB_FUNCTION | krb5_free_data_contents (krb5_context context, krb5_data *data) KRB5_DEPRECATED |
krb5_error_code KRB5_LIB_FUNCTION | krb5_set_real_time (krb5_context context, krb5_timestamp sec, int32_t usec) |
krb5_error_code KRB5_LIB_FUNCTION krb5_add_et_list | ( | krb5_context | context, | |
void(*)(struct et_list **) | func | |||
) |
Add a specified list of error messages to the et list in context. Call func (probably a comerr-generated function) with a pointer to the current et_list.
context | A kerberos context. | |
func | The generated com_err et function. |
krb5_error_code KRB5_LIB_FUNCTION krb5_add_extra_addresses | ( | krb5_context | context, | |
krb5_addresses * | addresses | |||
) |
Add extra address to the address list that the library will add to the client's address list when communicating with the KDC.
context | Kerberos 5 context. | |
addresses | addreses to add |
krb5_error_code KRB5_LIB_FUNCTION krb5_add_ignore_addresses | ( | krb5_context | context, | |
krb5_addresses * | addresses | |||
) |
Add extra addresses to ignore when fetching addresses from the underlaying operating system.
context | Kerberos 5 context. | |
addresses | addreses to ignore |
krb5_boolean KRB5_LIB_FUNCTION krb5_compare_creds | ( | krb5_context | context, | |
krb5_flags | whichfields, | |||
const krb5_creds * | mcreds, | |||
const krb5_creds * | creds | |||
) |
Return TRUE if `mcreds' and `creds' are equal (`whichfields' determines what equal means).
context | Kerberos 5 context. | |
whichfields | which fields to compare. | |
mcreds | cred to compare with. | |
creds | cred to compare with. |
krb5_error_code KRB5_LIB_FUNCTION krb5_copy_context | ( | krb5_context | context, | |
krb5_context * | out | |||
) |
Make a copy for the Kerberos 5 context, allocated krb5_contex shoud be freed with krb5_free_context().
context | the Kerberos context to copy | |
out | the copy of the Kerberos, set to NULL error. |
krb5_error_code KRB5_LIB_FUNCTION krb5_copy_creds | ( | krb5_context | context, | |
const krb5_creds * | incred, | |||
krb5_creds ** | outcred | |||
) |
Copy krb5_creds.
context | Kerberos 5 context. | |
incred | source credential | |
outcred | destination credential, free with krb5_free_creds(). |
krb5_error_code KRB5_LIB_FUNCTION krb5_copy_creds_contents | ( | krb5_context | context, | |
const krb5_creds * | incred, | |||
krb5_creds * | c | |||
) |
Copy content of krb5_creds.
context | Kerberos 5 context. | |
incred | source credential | |
c | destination credential, free with krb5_free_cred_contents(). |
krb5_error_code KRB5_LIB_FUNCTION krb5_copy_data | ( | krb5_context | context, | |
const krb5_data * | indata, | |||
krb5_data ** | outdata | |||
) |
Copy the data into a newly allocated krb5_data.
context | Kerberos 5 context. | |
indata | the krb5_data data to copy | |
outdata | new krb5_date to copy too. Free with krb5_free_data(). |
krb5_error_code KRB5_LIB_FUNCTION krb5_copy_host_realm | ( | krb5_context | context, | |
const krb5_realm * | from, | |||
krb5_realm ** | to | |||
) |
Copy the list of realms from `from' to `to'.
context | Kerberos 5 context. | |
from | list of realms to copy from. | |
to | list of realms to copy to, free list of krb5_free_host_realm(). |
unsigned long krb5_creds_get_ticket_flags | ( | krb5_creds * | creds | ) |
Returns the ticket flags for the credentials in creds. See also krb5_ticket_get_flags().
creds | credential to get ticket flags from |
krb5_error_code KRB5_LIB_FUNCTION krb5_data_alloc | ( | krb5_data * | p, | |
int | len | |||
) |
Allocate data of and krb5_data.
p | krb5_data to free. | |
len | size to allocate. |
int KRB5_LIB_FUNCTION krb5_data_cmp | ( | const krb5_data * | data1, | |
const krb5_data * | data2 | |||
) |
Compare to data.
data1 | krb5_data to compare | |
data2 | krb5_data to compare |
krb5_error_code KRB5_LIB_FUNCTION krb5_data_copy | ( | krb5_data * | p, | |
const void * | data, | |||
size_t | len | |||
) |
Copy the data of len into the krb5_data.
p | krb5_data to copy into. | |
data | data to copy.. | |
len | new size. |
void KRB5_LIB_FUNCTION krb5_data_free | ( | krb5_data * | p | ) |
Free the content of krb5_data structure, its ok to free a zeroed structure (with memset() or krb5_data_zero()). When done, the structure will be zeroed. The same function is called krb5_free_data_contents() in MIT Kerberos.
p | krb5_data to free. |
krb5_error_code KRB5_LIB_FUNCTION krb5_data_realloc | ( | krb5_data * | p, | |
int | len | |||
) |
Grow (or shrink) the content of krb5_data to a new size.
p | krb5_data to free. | |
len | new size. |
void KRB5_LIB_FUNCTION krb5_data_zero | ( | krb5_data * | p | ) |
Reset the (potentially uninitalized) krb5_data structure.
p | krb5_data to reset. |
void KRB5_LIB_FUNCTION krb5_free_config_files | ( | char ** | filenames | ) |
Free a list of configuration files.
filenames | list, terminated with a NULL pointer, to be freed. NULL is an valid argument. |
void KRB5_LIB_FUNCTION krb5_free_context | ( | krb5_context | context | ) |
krb5_error_code KRB5_LIB_FUNCTION krb5_free_cred_contents | ( | krb5_context | context, | |
krb5_creds * | c | |||
) |
Free content of krb5_creds.
context | Kerberos 5 context. | |
c | krb5_creds to free. |
krb5_error_code KRB5_LIB_FUNCTION krb5_free_creds | ( | krb5_context | context, | |
krb5_creds * | c | |||
) |
Free krb5_creds.
context | Kerberos 5 context. | |
c | krb5_creds to free. |
void KRB5_LIB_FUNCTION krb5_free_data | ( | krb5_context | context, | |
krb5_data * | p | |||
) |
Free krb5_data (and its content).
context | Kerberos 5 context. | |
p | krb5_data to free. |
void KRB5_LIB_FUNCTION krb5_free_data_contents | ( | krb5_context | context, | |
krb5_data * | data | |||
) |
Same as krb5_data_free(). MIT compat.
context | Kerberos 5 context. | |
data | krb5_data to free. |
krb5_error_code KRB5_LIB_FUNCTION krb5_get_default_config_files | ( | char *** | pfilenames | ) |
Get the global configuration list.
pfilenames | return array of filenames, should be freed with krb5_free_config_files(). |
krb5_error_code KRB5_LIB_FUNCTION krb5_get_default_in_tkt_etypes | ( | krb5_context | context, | |
krb5_enctype ** | etypes | |||
) |
Get the default encryption types that will be use in communcation with the KDC, clients and servers.
context | Kerberos 5 context. | |
etypes | Encryption types, array terminated with ETYPE_NULL(0), caller should free array with krb5_xfree(): |
krb5_boolean KRB5_LIB_FUNCTION krb5_get_dns_canonicalize_hostname | ( | krb5_context | context | ) |
Get if the library uses DNS to canonicalize hostnames.
context | Kerberos 5 context. |
const char* KRB5_LIB_FUNCTION krb5_get_err_text | ( | krb5_context | context, | |
krb5_error_code | code | |||
) |
Return the error string for the error code. The caller must not free the string.
context | Kerberos 5 context. | |
code | Kerberos error code. |
krb5_error_code KRB5_LIB_FUNCTION krb5_get_extra_addresses | ( | krb5_context | context, | |
krb5_addresses * | addresses | |||
) |
Get extra address to the address list that the library will add to the client's address list when communicating with the KDC.
context | Kerberos 5 context. | |
addresses | addreses to set |
krb5_error_code KRB5_LIB_FUNCTION krb5_get_fcache_version | ( | krb5_context | context, | |
int * | version | |||
) |
Get version of fcache that the library should use.
context | Kerberos 5 context. | |
version | version number. |
krb5_error_code KRB5_LIB_FUNCTION krb5_get_ignore_addresses | ( | krb5_context | context, | |
krb5_addresses * | addresses | |||
) |
Get extra addresses to ignore when fetching addresses from the underlaying operating system.
context | Kerberos 5 context. | |
addresses | list addreses ignored |
krb5_error_code KRB5_LIB_FUNCTION krb5_get_kdc_sec_offset | ( | krb5_context | context, | |
int32_t * | sec, | |||
int32_t * | usec | |||
) |
Get current offset in time to the KDC.
context | Kerberos 5 context. | |
sec | seconds part of offset. | |
usec | micro seconds part of offset. |
time_t KRB5_LIB_FUNCTION krb5_get_max_time_skew | ( | krb5_context | context | ) |
Get max time skew allowed.
context | Kerberos 5 context. |
krb5_boolean KRB5_LIB_FUNCTION krb5_get_use_admin_kdc | ( | krb5_context | context | ) |
Make the kerberos library default to the admin KDC.
context | Kerberos 5 context. |
krb5_error_code KRB5_LIB_FUNCTION krb5_init_context | ( | krb5_context * | context | ) |
Initializes the context structure and reads the configuration file /etc/krb5.conf. The structure should be freed by calling krb5_free_context() when it is no longer being used.
context | pointer to returned context |
void KRB5_LIB_FUNCTION krb5_init_ets | ( | krb5_context | context | ) |
Init the built-in ets in the Kerberos library.
context | kerberos context to add the ets too |
krb5_error_code KRB5_LIB_FUNCTION krb5_init_etype | ( | krb5_context | context, | |
unsigned * | len, | |||
krb5_enctype ** | val, | |||
const krb5_enctype * | etypes | |||
) |
Init encryption types in len, val with etypes.
context | Kerberos 5 context. | |
len | output length of val. | |
val | output array of enctypes. | |
etypes | etypes to set val and len to, if NULL, use default enctypes. |
krb5_boolean KRB5_LIB_FUNCTION krb5_is_thread_safe | ( | void | ) |
Runtime check if the Kerberos library was complied with thread support.
const krb5_enctype* KRB5_LIB_FUNCTION krb5_kerberos_enctypes | ( | krb5_context | context | ) |
Returns the list of Kerberos encryption types sorted in order of most preferred to least preferred encryption type. Note that some encryption types might be disabled, so you need to check with krb5_enctype_valid() before using the encryption type.
krb5_error_code KRB5_LIB_FUNCTION krb5_prepend_config_files_default | ( | const char * | filelist, | |
char *** | pfilenames | |||
) |
Prepend the filename to the global configuration list.
filelist | a filename to add to the default list of filename | |
pfilenames | return array of filenames, should be freed with krb5_free_config_files(). |
krb5_error_code KRB5_LIB_FUNCTION krb5_set_config_files | ( | krb5_context | context, | |
char ** | filenames | |||
) |
Reinit the context from a new set of filenames.
context | context to add configuration too. | |
filenames | array of filenames, end of list is indicated with a NULL filename. |
krb5_error_code KRB5_LIB_FUNCTION krb5_set_default_in_tkt_etypes | ( | krb5_context | context, | |
const krb5_enctype * | etypes | |||
) |
Set the default encryption types that will be use in communcation with the KDC, clients and servers.
context | Kerberos 5 context. | |
etypes | Encryption types, array terminated with ETYPE_NULL (0). |
void KRB5_LIB_FUNCTION krb5_set_dns_canonicalize_hostname | ( | krb5_context | context, | |
krb5_boolean | flag | |||
) |
Set if the library should use DNS to canonicalize hostnames.
context | Kerberos 5 context. | |
flag | if its dns canonicalizion is used or not. |
krb5_error_code KRB5_LIB_FUNCTION krb5_set_extra_addresses | ( | krb5_context | context, | |
const krb5_addresses * | addresses | |||
) |
Set extra address to the address list that the library will add to the client's address list when communicating with the KDC.
context | Kerberos 5 context. | |
addresses | addreses to set |
krb5_error_code KRB5_LIB_FUNCTION krb5_set_fcache_version | ( | krb5_context | context, | |
int | version | |||
) |
Set version of fcache that the library should use.
context | Kerberos 5 context. | |
version | version number. |
krb5_error_code KRB5_LIB_FUNCTION krb5_set_ignore_addresses | ( | krb5_context | context, | |
const krb5_addresses * | addresses | |||
) |
Set extra addresses to ignore when fetching addresses from the underlaying operating system.
context | Kerberos 5 context. | |
addresses | addreses to ignore |
krb5_error_code KRB5_LIB_FUNCTION krb5_set_kdc_sec_offset | ( | krb5_context | context, | |
int32_t | sec, | |||
int32_t | usec | |||
) |
Set current offset in time to the KDC.
context | Kerberos 5 context. | |
sec | seconds part of offset. | |
usec | micro seconds part of offset. |
void KRB5_LIB_FUNCTION krb5_set_max_time_skew | ( | krb5_context | context, | |
time_t | t | |||
) |
Set max time skew allowed.
context | Kerberos 5 context. | |
t | timeskew in seconds. |
krb5_error_code KRB5_LIB_FUNCTION krb5_set_password | ( | krb5_context | context, | |
krb5_creds * | creds, | |||
const char * | newpw, | |||
krb5_principal | targprinc, | |||
int * | result_code, | |||
krb5_data * | result_code_string, | |||
krb5_data * | result_string | |||
) |
Change password using creds.
context | a Keberos context | |
creds | The initial kadmin/passwd for the principal or an admin principal | |
newpw | The new password to set | |
targprinc | if unset, the default principal is used. | |
result_code | Result code, KRB5_KPASSWD_SUCCESS is when password is changed. | |
result_code_string | binary message from the server, contains at least the result_code. | |
result_string | A message from the kpasswd service or the library in human printable form. The string is NUL terminated. |
krb5_error_code KRB5_LIB_FUNCTION krb5_set_real_time | ( | krb5_context | context, | |
krb5_timestamp | sec, | |||
int32_t | usec | |||
) |
Set the absolute time that the caller knows the kdc has so the kerberos library can calculate the relative diffrence beteen the KDC time and local system time.
context | Keberos 5 context. | |
sec | The applications new of "now" in seconds | |
usec | The applications new of "now" in micro seconds |
If the caller passes in a negative usec, its assumed to be unknown and the function will use the current time usec.
void KRB5_LIB_FUNCTION krb5_set_use_admin_kdc | ( | krb5_context | context, | |
krb5_boolean | flag | |||
) |
Make the kerberos library default to the admin KDC.
context | Kerberos 5 context. | |
flag | boolean flag to select if the use the admin KDC or not. |