keyhole logo

Heimdal Kerberos 5 credential cache functions


Functions

krb5_error_code KRB5_LIB_FUNCTION krb5_cc_register (krb5_context context, const krb5_cc_ops *ops, krb5_boolean override)
krb5_error_code KRB5_LIB_FUNCTION krb5_cc_resolve (krb5_context context, const char *name, krb5_ccache *id)
krb5_error_code KRB5_LIB_FUNCTION krb5_cc_gen_new (krb5_context context, const krb5_cc_ops *ops, krb5_ccache *id)
krb5_error_code KRB5_LIB_FUNCTION krb5_cc_new_unique (krb5_context context, const char *type, const char *hint, krb5_ccache *id)
const char *KRB5_LIB_FUNCTION krb5_cc_get_name (krb5_context context, krb5_ccache id)
const char *KRB5_LIB_FUNCTION krb5_cc_get_type (krb5_context context, krb5_ccache id)
krb5_error_code KRB5_LIB_FUNCTION krb5_cc_get_full_name (krb5_context context, krb5_ccache id, char **str)
const krb5_cc_ops * krb5_cc_get_ops (krb5_context context, krb5_ccache id)
krb5_error_code krb5_cc_switch (krb5_context context, krb5_ccache id)
krb5_error_code KRB5_LIB_FUNCTION krb5_cc_set_default_name (krb5_context context, const char *name)
const char *KRB5_LIB_FUNCTION krb5_cc_default_name (krb5_context context)
krb5_error_code KRB5_LIB_FUNCTION krb5_cc_default (krb5_context context, krb5_ccache *id)
krb5_error_code KRB5_LIB_FUNCTION krb5_cc_initialize (krb5_context context, krb5_ccache id, krb5_principal primary_principal)
krb5_error_code KRB5_LIB_FUNCTION krb5_cc_destroy (krb5_context context, krb5_ccache id)
krb5_error_code KRB5_LIB_FUNCTION krb5_cc_close (krb5_context context, krb5_ccache id)
krb5_error_code KRB5_LIB_FUNCTION krb5_cc_store_cred (krb5_context context, krb5_ccache id, krb5_creds *creds)
krb5_error_code KRB5_LIB_FUNCTION krb5_cc_retrieve_cred (krb5_context context, krb5_ccache id, krb5_flags whichfields, const krb5_creds *mcreds, krb5_creds *creds)
krb5_error_code KRB5_LIB_FUNCTION krb5_cc_get_principal (krb5_context context, krb5_ccache id, krb5_principal *principal)
krb5_error_code KRB5_LIB_FUNCTION krb5_cc_start_seq_get (krb5_context context, const krb5_ccache id, krb5_cc_cursor *cursor)
krb5_error_code KRB5_LIB_FUNCTION krb5_cc_next_cred (krb5_context context, const krb5_ccache id, krb5_cc_cursor *cursor, krb5_creds *creds)
krb5_error_code KRB5_LIB_FUNCTION krb5_cc_next_cred_match (krb5_context context, const krb5_ccache id, krb5_cc_cursor *cursor, krb5_creds *creds, krb5_flags whichfields, const krb5_creds *mcreds)
krb5_error_code KRB5_LIB_FUNCTION krb5_cc_end_seq_get (krb5_context context, const krb5_ccache id, krb5_cc_cursor *cursor)
krb5_error_code KRB5_LIB_FUNCTION krb5_cc_remove_cred (krb5_context context, krb5_ccache id, krb5_flags which, krb5_creds *cred)
krb5_error_code KRB5_LIB_FUNCTION krb5_cc_set_flags (krb5_context context, krb5_ccache id, krb5_flags flags)
krb5_error_code KRB5_LIB_FUNCTION krb5_cc_copy_cache_match (krb5_context context, const krb5_ccache from, krb5_ccache to, krb5_flags whichfields, const krb5_creds *mcreds, unsigned int *matched)
krb5_error_code KRB5_LIB_FUNCTION krb5_cc_copy_cache (krb5_context context, const krb5_ccache from, krb5_ccache to)
krb5_error_code KRB5_LIB_FUNCTION krb5_cc_get_version (krb5_context context, const krb5_ccache id)
void KRB5_LIB_FUNCTION krb5_cc_clear_mcred (krb5_creds *mcred)
const krb5_cc_ops * krb5_cc_get_prefix_ops (krb5_context context, const char *prefix)
krb5_error_code KRB5_LIB_FUNCTION krb5_cc_cache_get_first (krb5_context context, const char *type, krb5_cc_cache_cursor *cursor)
krb5_error_code KRB5_LIB_FUNCTION krb5_cc_cache_next (krb5_context context, krb5_cc_cache_cursor cursor, krb5_ccache *id)
krb5_error_code KRB5_LIB_FUNCTION krb5_cc_cache_end_seq_get (krb5_context context, krb5_cc_cache_cursor cursor)
krb5_error_code KRB5_LIB_FUNCTION krb5_cc_cache_match (krb5_context context, krb5_principal client, const char *type, krb5_ccache *id)
krb5_error_code krb5_cc_move (krb5_context context, krb5_ccache from, krb5_ccache to)

Variables

KRB5_LIB_VARIABLE const krb5_cc_ops krb5_acc_ops
KRB5_LIB_VARIABLE const krb5_cc_ops krb5_fcc_ops
KRB5_LIB_VARIABLE const krb5_cc_ops krb5_mcc_ops
KRB5_LIB_VARIABLE const krb5_cc_ops krb5_scc_ops

Detailed Description


Function Documentation

krb5_error_code KRB5_LIB_FUNCTION krb5_cc_cache_end_seq_get ( krb5_context  context,
krb5_cc_cache_cursor  cursor 
)

Destroy the cursor `cursor'.

Returns:
Return 0 or an error code.

krb5_error_code KRB5_LIB_FUNCTION krb5_cc_cache_get_first ( krb5_context  context,
const char *  type,
krb5_cc_cache_cursor *  cursor 
)

Start iterating over all caches of `type'. If `type' is NULL, the default type is * used. `cursor' is initialized to the beginning.

Returns:
Return 0 or an error code.

krb5_error_code KRB5_LIB_FUNCTION krb5_cc_cache_match ( krb5_context  context,
krb5_principal  client,
const char *  type,
krb5_ccache *  id 
)

Search for a matching credential cache of type `type' that have the `principal' as the default principal. If NULL is used for `type', the default type is used. On success, `id' needs to be freed with krb5_cc_close or krb5_cc_destroy.

Returns:
On failure, error code is returned and `id' is set to NULL.

krb5_error_code KRB5_LIB_FUNCTION krb5_cc_cache_next ( krb5_context  context,
krb5_cc_cache_cursor  cursor,
krb5_ccache *  id 
)

Retrieve the next cache pointed to by (`cursor') in `id' and advance `cursor'.

Returns:
Return 0 or an error code.

void KRB5_LIB_FUNCTION krb5_cc_clear_mcred ( krb5_creds *  mcred  ) 

Clear `mcreds' so it can be used with krb5_cc_retrieve_cred

krb5_error_code KRB5_LIB_FUNCTION krb5_cc_close ( krb5_context  context,
krb5_ccache  id 
)

Stop using the ccache `id' and free the related resources.

Returns:
Return 0 or an error code.

krb5_error_code KRB5_LIB_FUNCTION krb5_cc_copy_cache ( krb5_context  context,
const krb5_ccache  from,
krb5_ccache  to 
)

Just like krb5_cc_copy_cache_match, but copy everything.

krb5_error_code KRB5_LIB_FUNCTION krb5_cc_copy_cache_match ( krb5_context  context,
const krb5_ccache  from,
krb5_ccache  to,
krb5_flags  whichfields,
const krb5_creds *  mcreds,
unsigned int *  matched 
)

Copy the contents of `from' to `to'.

krb5_error_code KRB5_LIB_FUNCTION krb5_cc_default ( krb5_context  context,
krb5_ccache *  id 
)

Open the default ccache in `id'.

Returns:
Return 0 or an error code.

const char* KRB5_LIB_FUNCTION krb5_cc_default_name ( krb5_context  context  ) 

Return a pointer to a context static string containing the default ccache name.

Returns:
String to the default credential cache name.

krb5_error_code KRB5_LIB_FUNCTION krb5_cc_destroy ( krb5_context  context,
krb5_ccache  id 
)

Remove the ccache `id'.

Returns:
Return 0 or an error code.

krb5_error_code KRB5_LIB_FUNCTION krb5_cc_end_seq_get ( krb5_context  context,
const krb5_ccache  id,
krb5_cc_cursor *  cursor 
)

Destroy the cursor `cursor'.

krb5_error_code KRB5_LIB_FUNCTION krb5_cc_gen_new ( krb5_context  context,
const krb5_cc_ops *  ops,
krb5_ccache *  id 
)

Generate a new ccache of type `ops' in `id'.

Returns:
Return 0 or an error code.

krb5_error_code KRB5_LIB_FUNCTION krb5_cc_get_full_name ( krb5_context  context,
krb5_ccache  id,
char **  str 
)

Return the complete resolvable name the ccache `id' in `strī. `str` should be freed with free(3). Returns 0 or an error (and then *str is set to NULL).

const char* KRB5_LIB_FUNCTION krb5_cc_get_name ( krb5_context  context,
krb5_ccache  id 
)

Return the name of the ccache `id'

const krb5_cc_ops* krb5_cc_get_ops ( krb5_context  context,
krb5_ccache  id 
)

Return krb5_cc_ops of a the ccache `id'.

const krb5_cc_ops* krb5_cc_get_prefix_ops ( krb5_context  context,
const char *  prefix 
)

Get the cc ops that is registered in `context' to handle the prefix. prefix can be a complete credential cache name or a prefix, the function will only use part up to the first colon (:) if there is one. If prefix the argument is NULL, the default ccache implemtation is returned.

Returns:
Returns NULL if ops not found.

krb5_error_code KRB5_LIB_FUNCTION krb5_cc_get_principal ( krb5_context  context,
krb5_ccache  id,
krb5_principal *  principal 
)

Return the principal of `id' in `principal'.

Returns:
Return 0 or an error code.

const char* KRB5_LIB_FUNCTION krb5_cc_get_type ( krb5_context  context,
krb5_ccache  id 
)

Return the type of the ccache `id'.

krb5_error_code KRB5_LIB_FUNCTION krb5_cc_get_version ( krb5_context  context,
const krb5_ccache  id 
)

Return the version of `id'.

krb5_error_code KRB5_LIB_FUNCTION krb5_cc_initialize ( krb5_context  context,
krb5_ccache  id,
krb5_principal  primary_principal 
)

Create a new ccache in `id' for `primary_principal'.

Returns:
Return 0 or an error code.

krb5_error_code krb5_cc_move ( krb5_context  context,
krb5_ccache  from,
krb5_ccache  to 
)

Move the content from one credential cache to another. The operation is an atomic switch.

Parameters:
context a Keberos context
from the credential cache to move the content from
to the credential cache to move the content to
Returns:
On sucess, from is freed. On failure, error code is returned and from and to are both still allocated.

krb5_error_code KRB5_LIB_FUNCTION krb5_cc_new_unique ( krb5_context  context,
const char *  type,
const char *  hint,
krb5_ccache *  id 
)

Generates a new unique ccache of `type` in `id'. If `type' is NULL, the library chooses the default credential cache type. The supplied `hint' (that can be NULL) is a string that the credential cache type can use to base the name of the credential on, this is to make it easier for the user to differentiate the credentials.

Returns:
Returns 0 or an error code.

krb5_error_code KRB5_LIB_FUNCTION krb5_cc_next_cred ( krb5_context  context,
const krb5_ccache  id,
krb5_cc_cursor *  cursor,
krb5_creds *  creds 
)

Retrieve the next cred pointed to by (`id', `cursor') in `creds' and advance `cursor'.

Returns:
Return 0 or an error code.

krb5_error_code KRB5_LIB_FUNCTION krb5_cc_next_cred_match ( krb5_context  context,
const krb5_ccache  id,
krb5_cc_cursor *  cursor,
krb5_creds *  creds,
krb5_flags  whichfields,
const krb5_creds *  mcreds 
)

Like krb5_cc_next_cred, but allow for selective retrieval

krb5_error_code KRB5_LIB_FUNCTION krb5_cc_register ( krb5_context  context,
const krb5_cc_ops *  ops,
krb5_boolean  override 
)

Add a new ccache type with operations `ops', overwriting any existing one if `override'.

Parameters:
context a Keberos context
ops type of plugin symbol
override flag to select if the registration is to overide an existing ops with the same name.
Returns:
Return an error code or 0.

krb5_error_code KRB5_LIB_FUNCTION krb5_cc_remove_cred ( krb5_context  context,
krb5_ccache  id,
krb5_flags  which,
krb5_creds *  cred 
)

Remove the credential identified by `cred', `which' from `id'.

krb5_error_code KRB5_LIB_FUNCTION krb5_cc_resolve ( krb5_context  context,
const char *  name,
krb5_ccache *  id 
)

Find and allocate a ccache in `id' from the specification in `residual'. If the ccache name doesn't contain any colon, interpret it as a file name.

Parameters:
context a Keberos context.
name string name of a credential cache.
id return pointer to a found credential cache.
Returns:
Return 0 or an error code. In case of an error, id is set to NULL.

krb5_error_code KRB5_LIB_FUNCTION krb5_cc_retrieve_cred ( krb5_context  context,
krb5_ccache  id,
krb5_flags  whichfields,
const krb5_creds *  mcreds,
krb5_creds *  creds 
)

Retrieve the credential identified by `mcreds' (and `whichfields') from `id' in `creds'. 'creds' must be free by the caller using krb5_free_cred_contents.

Returns:
Return 0 or an error code.

krb5_error_code KRB5_LIB_FUNCTION krb5_cc_set_default_name ( krb5_context  context,
const char *  name 
)

Set the default cc name for `context' to `name'.

krb5_error_code KRB5_LIB_FUNCTION krb5_cc_set_flags ( krb5_context  context,
krb5_ccache  id,
krb5_flags  flags 
)

Set the flags of `id' to `flags'.

krb5_error_code KRB5_LIB_FUNCTION krb5_cc_start_seq_get ( krb5_context  context,
const krb5_ccache  id,
krb5_cc_cursor *  cursor 
)

Start iterating over `id', `cursor' is initialized to the beginning.

Returns:
Return 0 or an error code.

krb5_error_code KRB5_LIB_FUNCTION krb5_cc_store_cred ( krb5_context  context,
krb5_ccache  id,
krb5_creds *  creds 
)

Store `creds' in the ccache `id'.

Returns:
Return 0 or an error code.

krb5_error_code krb5_cc_switch ( krb5_context  context,
krb5_ccache  id 
)

Switch the default default credential cache for a specific credcache type (and name for some implementations).

Returns:
Returns 0 or an error code.


Variable Documentation

KRB5_LIB_VARIABLE const krb5_cc_ops krb5_acc_ops

Initial value:

 {
    KRB5_CC_OPS_VERSION,
    "API",
    acc_get_name,
    acc_resolve,
    acc_gen_new,
    acc_initialize,
    acc_destroy,
    acc_close,
    acc_store_cred,
    NULL, 
    acc_get_principal,
    acc_get_first,
    acc_get_next,
    acc_end_get,
    acc_remove_cred,
    acc_set_flags,
    acc_get_version,
    acc_get_cache_first,
    acc_get_cache_next,
    acc_end_cache_get,
    acc_move,
    acc_get_default_name,
    acc_set_default
}
Variable containing the API based credential cache implemention.

KRB5_LIB_VARIABLE const krb5_cc_ops krb5_fcc_ops

Initial value:

 {
    KRB5_CC_OPS_VERSION,
    "FILE",
    fcc_get_name,
    fcc_resolve,
    fcc_gen_new,
    fcc_initialize,
    fcc_destroy,
    fcc_close,
    fcc_store_cred,
    NULL, 
    fcc_get_principal,
    fcc_get_first,
    fcc_get_next,
    fcc_end_get,
    fcc_remove_cred,
    fcc_set_flags,
    fcc_get_version,
    fcc_get_cache_first,
    fcc_get_cache_next,
    fcc_end_cache_get,
    fcc_move,
    fcc_default_name
}
Variable containing the FILE based credential cache implemention.

KRB5_LIB_VARIABLE const krb5_cc_ops krb5_mcc_ops

Initial value:

 {
    KRB5_CC_OPS_VERSION,
    "MEMORY",
    mcc_get_name,
    mcc_resolve,
    mcc_gen_new,
    mcc_initialize,
    mcc_destroy,
    mcc_close,
    mcc_store_cred,
    NULL, 
    mcc_get_principal,
    mcc_get_first,
    mcc_get_next,
    mcc_end_get,
    mcc_remove_cred,
    mcc_set_flags,
    NULL,
    mcc_get_cache_first,
    mcc_get_cache_next,
    mcc_end_cache_get,
    mcc_move,
    mcc_default_name
}
Variable containing the MEMORY based credential cache implemention.

KRB5_LIB_VARIABLE const krb5_cc_ops krb5_scc_ops

Initial value:

 {
    KRB5_CC_OPS_VERSION,
    "SDB",
    scc_get_name,
    scc_resolve,
    scc_gen_new,
    scc_initialize,
    scc_destroy,
    scc_close,
    scc_store_cred,
    NULL, 
    scc_get_principal,
    scc_get_first,
    scc_get_next,
    scc_end_get,
    scc_remove_cred,
    scc_set_flags,
    NULL,
    scc_get_cache_first,
    scc_get_cache_next,
    scc_end_cache_get,
    scc_move,
    scc_get_default_name,
    scc_set_default
}
Variable containing the SDB based credential cache implemention.


Generated on Sat Sep 5 22:14:31 2009 for HeimdalKerberos5library by doxygen 1.5.4