From 75d262a3a46c8f483f7a4e5504ef34fc360fb722 Mon Sep 17 00:00:00 2001 From: John Kohl Date: Wed, 17 Jan 1990 17:29:09 +0000 Subject: [PATCH] update to reality with new interface git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@110 dc483132-0cff-0310-8789-dd5450dbe970 --- src/include/krb5/ccache.h | 40 +++++++++++++++++++++++++++++---------- 1 file changed, 30 insertions(+), 10 deletions(-) diff --git a/src/include/krb5/ccache.h b/src/include/krb5/ccache.h index 63f5a44fe..a7661b4a3 100644 --- a/src/include/krb5/ccache.h +++ b/src/include/krb5/ccache.h @@ -8,21 +8,41 @@ * For copying and distribution information, please see the file * . * - * Ticket cache definitions. + * Credentials cache definitions. */ #include -#ifndef __KRB5_TCACHE__ -#define __KRB5_TCACHE__ +#ifndef __KRB5_CCACHE__ +#define __KRB5_CCACHE__ -typedef char * krb5_tcache_name; /* a name of a ticket cache */ -typedef int krb5_tcache_id; /* a short "identifier" for quick - cache access */ -typedef int krb5_tcache_magic; /* cookie for sequential lookup */ +typedef krb5_pointer krb5_cc_cursor; /* cursor for sequential lookup */ -#define KRB5_TC_READ 0 /* open cache for read only */ -#define KRB5_TC_RDWR 1 /* open cache for read/write */ +typedef struct _krb5_ccache { + struct krb5_cc_ops *ops; + void *data; +} *krb5_ccache; + +typedef struct _krb5_cc_ops { + char *prefix; + krb5_ccache (*resolve) PROTOTYPE((char *residual)); + krb5_ccache (*gen_new) PROTOTYPE((void)); + char *(*get_name) PROTOTYPE((krb5_ccache)); + int (*init) PROTOTYPE((krb5_ccache, krb5_principal)); + int (*destroy) PROTOTYPE((krb5_ccache)); + int (*close) PROTOTYPE((krb5_ccache)); + int (*store) PROTOTYPE((krb5_ccache, krb5_credentials *)); + int (*retrieve) PROTOTYPE((krb5_ccache, krb5_flags, + krb5_credentials *, krb5_credentials *)); + int (*get_princ) PROTOTYPE((krb5_ccache, krb5_principal *)); + int (*get_first) PROTOTYPE((krb5_ccache, krb5_cc_cursor *)); + int (*get_next) PROTOTYPE((krb5_ccache, krb5_cc_cursor *, + krb5_credentials *)); + int (*end_get) PROTOTYPE((krb5_ccache, krb5_cc_cursor *)); + int (*remove_cred) PROTOTYPE((krb5_ccache, krb5_flags, + krb5_credentials *)); + int (*set_flags) PROTOTYPE((krb5_ccache, krb5_cflags)); +} krb5_cc_ops; /* for retrieve_cred */ #define KRB5_TC_MATCH_TIMES 0x00000001 @@ -31,4 +51,4 @@ typedef int krb5_tcache_magic; /* cookie for sequential lookup */ #define KRB5_TC_MATCH_TIMES_EXACT 0x00000008 #define KRB5_TC_MATCH_FLAGS_EXACT 0x00000010 -#endif /* __KRB5_TCACHE__ */ +#endif /* __KRB5_CCACHE__ */ -- 2.26.2