| cc_int32(* release)(cc_context_t io_context) |
cc_context_release(): Release memory associated with a cc_context_t.
| io_context | the context object to free. |
| cc_int32(* get_change_time)(cc_context_t in_context, cc_time_t *out_time) |
cc_context_get_change_time(): Get the last time the cache collection changed.
| in_context | the context object for the cache collection to examine. | |
| out_time | on exit, the time of the most recent change for the entire ccache collection. |
The time returned by cc_context_get_changed_time() increases whenever:
| cc_int32(* get_default_ccache_name)(cc_context_t in_context, cc_string_t *out_name) |
cc_context_get_default_ccache_name(): Get the name of the default ccache.
| in_context | the context object for the cache collection. | |
| out_name | on exit, the name of the default ccache. |
If there is no default ccache, and the client is creating a new ccache, it should be created with the default name. If there already is a default ccache, and the client wants to create a new ccache (as opposed to reusing an existing ccache), it should be created with any unique name; create_new_ccache() can be used to accomplish that more easily.
If the first ccache is created with a name other than the default name, then the processes already running will not notice the credentials stored in the new ccache, which is normally undesirable.
| cc_int32(* open_ccache)(cc_context_t in_context, const char *in_name, cc_ccache_t *out_ccache) |
cc_context_open_ccache(): Open a ccache.
| in_context | the context object for the cache collection. | |
| in_name | the name of the ccache to open. | |
| out_ccache | on exit, a ccache object for the ccache |
The list of all ccache names, principals, and credentials versions may be retrieved by calling cc_context_new_cache_iterator(), cc_ccache_get_name(), cc_ccache_get_principal(), and cc_ccache_get_cred_version().
| cc_int32(* open_default_ccache)(cc_context_t in_context, cc_ccache_t *out_ccache) |
cc_context_open_default_ccache(): Open the default ccache.
| in_context | the context object for the cache collection. | |
| out_ccache | on exit, a ccache object for the default ccache |
This function performs the same function as calling cc_context_get_default_ccache_name followed by cc_context_open_ccache, but it performs it atomically.
| cc_int32(* create_ccache)(cc_context_t in_context, const char *in_name, cc_uint32 in_cred_vers, const char *in_principal, cc_ccache_t *out_ccache) |
cc_context_create_ccache(): Create a new ccache.
| in_context | the context object for the cache collection. | |
| in_name | the name of the new ccache to create | |
| in_cred_vers | the version of the credentials the new ccache will hold | |
| in_principal | the client principal of the credentials the new ccache will hold | |
| out_ccache | on exit, a ccache object for the newly created ccache |
If you want to create a new ccache (with a unique name), you should use cc_context_create_new_ccache() instead. If you want to create or reinitialize the default cache, you should use cc_context_create_default_ccache().
If name is non-NULL and there is already a ccache named name:
If the created ccache is the first ccache in the collection, it is made the default ccache. Note that normally it is undesirable to create the first ccache with a name different from the default ccache name (as returned by cc_context_get_default_ccache_name()); see the description of cc_context_get_default_ccache_name() for details.
The principal should be a C string containing an unparsed Kerberos principal in the format of the appropriate Kerberos version, i.e.
foo.bar/@BAZ
* foo/bar/@BAZ
| cc_int32(* create_default_ccache)(cc_context_t in_context, cc_uint32 in_cred_vers, const char *in_principal, cc_ccache_t *out_ccache) |
cc_context_create_default_ccache(): Create a new default ccache.
| in_context | the context object for the cache collection. | |
| in_cred_vers | the version of the credentials the new default ccache will hold | |
| in_principal | the client principal of the credentials the new default ccache will hold | |
| out_ccache | on exit, a ccache object for the newly created default ccache |
| cc_int32(* create_new_ccache)(cc_context_t in_context, cc_uint32 in_cred_vers, const char *in_principal, cc_ccache_t *out_ccache) |
cc_context_create_new_ccache(): Create a new uniquely named ccache.
| in_context | the context object for the cache collection. | |
| in_cred_vers | the version of the credentials the new ccache will hold | |
| in_principal | the client principal of the credentials the new ccache will hold | |
| out_ccache | on exit, a ccache object for the newly created ccache |
| cc_int32(* new_ccache_iterator)(cc_context_t in_context, cc_ccache_iterator_t *out_iterator) |
cc_context_new_ccache_iterator(): Get an iterator for the cache collection.
| in_context | the context object for the cache collection. | |
| out_iterator | on exit, a ccache iterator object for the ccache collection. |
If changes are made to the collection while an iterator is being used on it, the iterator must return at least the intersection, and at most the union, of the set of ccaches that were present when the iteration began and the set of ccaches that are present when it ends.
| cc_int32(* lock)(cc_context_t in_context, cc_uint32 in_lock_type, cc_uint32 in_block) |
cc_context_lock(): Lock the cache collection.
| in_context | the context object for the cache collection. | |
| in_lock_type | the type of lock to obtain. | |
| in_block | whether or not the function should block if the lock cannot be obtained immediately. |
Locks apply only to the list of ccaches, not the contents of those ccaches. To prevent callers participating in the advisory locking from changing the credentials in a cache you must also lock that ccache with cc_ccache_lock(). This is so that you can get the list of ccaches without preventing applications from simultaneously obtaining service tickets.
To avoid having to deal with differences between thread semantics on different platforms, locks are granted per context, rather than per thread or per process. That means that different threads of execution have to acquire separate contexts in order to be able to synchronize with each other.
The lock should be unlocked by using cc_context_unlock().
| cc_int32(* unlock)(cc_context_t in_cc_context) |
cc_context_unlock(): Unlock the cache collection.
| in_context | the context object for the cache collection. |
| cc_int32(* compare)(cc_context_t in_cc_context, cc_context_t in_compare_to_context, cc_uint32 *out_equal) |
cc_context_compare(): Compare two context objects.
| in_context | a context object. | |
| in_compare_to_context | a context object to compare with in_context. | |
| out_equal | on exit, whether or not the two contexts refer to the same cache collection. |
| cc_int32(* wait_for_change)(cc_context_t in_cc_context) |
cc_context_wait_for_change(): Wait for the next change in the cache collection.
| in_context | a context object. |
cc_context_wait_for_change() will return whenever:
1.5.3