2N/A/* -*- mode: c; c-basic-offset: 4; indent-tabs-mode: nil -*- */
2N/A/*
2N/A * lib/krb5/ccache/file/cc-int.h
2N/A *
2N/A * Copyright 1990,1991 by the Massachusetts Institute of Technology.
2N/A * All Rights Reserved.
2N/A *
2N/A * Export of this software from the United States of America may
2N/A * require a specific license from the United States Government.
2N/A * It is the responsibility of any person or organization contemplating
2N/A * export to obtain such a license before exporting.
2N/A *
2N/A * WITHIN THAT CONSTRAINT, permission to use, copy, modify, and
2N/A * distribute this software and its documentation for any purpose and
2N/A * without fee is hereby granted, provided that the above copyright
2N/A * notice appear in all copies and that both that copyright notice and
2N/A * this permission notice appear in supporting documentation, and that
2N/A * the name of M.I.T. not be used in advertising or publicity pertaining
2N/A * to distribution of the software without specific, written prior
2N/A * permission. Furthermore if you modify this software you must label
2N/A * your software as modified software and not distribute it in such a
2N/A * fashion that it might be confused with the original M.I.T. software.
2N/A * M.I.T. makes no representations about the suitability of
2N/A * this software for any purpose. It is provided "as is" without express
2N/A * or implied warranty.
2N/A *
2N/A *
2N/A * This file contains constant and function declarations used in the
2N/A * file-based credential cache routines.
2N/A */
2N/A
2N/A#ifndef __KRB5_CCACHE_H__
2N/A#define __KRB5_CCACHE_H__
2N/A
2N/A#include "k5-int.h"
2N/A
2N/Akrb5_boolean
2N/Akrb5int_cc_creds_match_request(krb5_context, krb5_flags whichfields, krb5_creds *mcreds, krb5_creds *creds);
2N/A
2N/Aint
2N/Akrb5int_cc_initialize(void);
2N/A
2N/Avoid
2N/Akrb5int_cc_finalize(void);
2N/A
2N/Akrb5_error_code krb5int_random_string (krb5_context, char *, unsigned int);
2N/A
2N/A/*
2N/A * Cursor for iterating over ccache types
2N/A */
2N/Astruct krb5_cc_typecursor;
2N/Atypedef struct krb5_cc_typecursor *krb5_cc_typecursor;
2N/A
2N/Akrb5_error_code
2N/Akrb5int_cc_typecursor_new(krb5_context context, krb5_cc_typecursor *cursor);
2N/A
2N/Akrb5_error_code
2N/Akrb5int_cc_typecursor_next(
2N/A krb5_context context,
2N/A krb5_cc_typecursor cursor,
2N/A const struct _krb5_cc_ops **ops);
2N/A
2N/Akrb5_error_code
2N/Akrb5int_cc_typecursor_free(
2N/A krb5_context context,
2N/A krb5_cc_typecursor *cursor);
2N/A
2N/A/* reentrant mutex used by krb5_cc_* functions */
2N/Atypedef struct _k5_cc_mutex {
2N/A k5_mutex_t lock;
2N/A krb5_context owner;
2N/A krb5_int32 refcount;
2N/A} k5_cc_mutex;
2N/A
2N/A#define K5_CC_MUTEX_PARTIAL_INITIALIZER \
2N/A { K5_MUTEX_PARTIAL_INITIALIZER, NULL, 0 }
2N/A
2N/Akrb5_error_code
2N/Ak5_cc_mutex_init(k5_cc_mutex *m);
2N/A
2N/Akrb5_error_code
2N/Ak5_cc_mutex_finish_init(k5_cc_mutex *m);
2N/A
2N/A#define k5_cc_mutex_destroy(M) \
2N/A k5_mutex_destroy(&(M)->lock);
2N/A
2N/Avoid
2N/Ak5_cc_mutex_assert_locked(krb5_context context, k5_cc_mutex *m);
2N/A
2N/Avoid
2N/Ak5_cc_mutex_assert_unlocked(krb5_context context, k5_cc_mutex *m);
2N/A
2N/Akrb5_error_code
2N/Ak5_cc_mutex_lock(krb5_context context, k5_cc_mutex *m);
2N/A
2N/Akrb5_error_code
2N/Ak5_cc_mutex_unlock(krb5_context context, k5_cc_mutex *m);
2N/A
2N/Aextern k5_cc_mutex krb5int_mcc_mutex;
2N/Aextern k5_cc_mutex krb5int_krcc_mutex;
2N/Aextern k5_cc_mutex krb5int_cc_file_mutex;
2N/A
2N/A#ifdef USE_CCAPI_V3
2N/Aextern krb5_error_code KRB5_CALLCONV krb5_stdccv3_context_lock
2N/A(krb5_context context);
2N/A
2N/Aextern krb5_error_code KRB5_CALLCONV krb5_stdccv3_context_unlock
2N/A(krb5_context context);
2N/A#endif
2N/A
2N/Akrb5_error_code
2N/Ak5_cc_mutex_force_unlock(k5_cc_mutex *m);
2N/A
2N/Akrb5_error_code
2N/Ak5_cccol_force_unlock(void);
2N/A
2N/A#endif /* __KRB5_CCACHE_H__ */