From: Ken Raeburn Date: Wed, 2 Jun 2004 22:25:37 +0000 (+0000) Subject: Move definitions of struct krb5_rc_st, struct _krb5_rc_ops, krb5_rc_ops, and X-Git-Tag: krb5-1.4-beta1~381 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=ed83f1a5cdea894f6e550bd3274ccdb316b3dbf9;p=krb5.git Move definitions of struct krb5_rc_st, struct _krb5_rc_ops, krb5_rc_ops, and declarations of krb5_rc_register_type, krb5_rc_dfl_ops from k5-int.h to rc-int.h. Include rc-int.h in the krb5/rcache files that need it. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16386 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/include/ChangeLog b/src/include/ChangeLog index 22fb03879..87707074e 100644 --- a/src/include/ChangeLog +++ b/src/include/ChangeLog @@ -1,3 +1,10 @@ +2004-06-02 Ken Raeburn + + * k5-int.h (struct krb5_rc_st, struct _krb5_rc_ops, krb5_rc_ops): + Move type definitions to rc-int.h. + (krb5_rc_register_type, krb5_rc_dfl_ops): Move declarations to + rc-int.h. + 2004-05-30 Ken Raeburn * k5-int.h (krb5int_crypto_init, krb5int_prng_init): Declare. diff --git a/src/include/k5-int.h b/src/include/k5-int.h index 413fc6087..67fb028eb 100644 --- a/src/include/k5-int.h +++ b/src/include/k5-int.h @@ -1806,15 +1806,6 @@ struct _krb5_cc_ops { extern const krb5_cc_ops *krb5_cc_dfl_ops; -/* And this should be in lib/krb5/rcache somewhere. */ - -struct krb5_rc_st { - krb5_magic magic; - const struct _krb5_rc_ops *ops; - krb5_pointer data; - k5_mutex_t lock; -}; - typedef struct _krb5_donot_replay { krb5_magic magic; krb5_ui_4 hash; @@ -1865,35 +1856,6 @@ char *KRB5_CALLCONV krb5_rc_get_name krb5_error_code KRB5_CALLCONV krb5_rc_resolve (krb5_context, krb5_rcache, char *); -struct _krb5_rc_ops { - krb5_magic magic; - char *type; - krb5_error_code (KRB5_CALLCONV *init) - (krb5_context, krb5_rcache,krb5_deltat); /* create */ - krb5_error_code (KRB5_CALLCONV *recover) - (krb5_context, krb5_rcache); /* open */ - krb5_error_code (KRB5_CALLCONV *destroy) - (krb5_context, krb5_rcache); - krb5_error_code (KRB5_CALLCONV *close) - (krb5_context, krb5_rcache); - krb5_error_code (KRB5_CALLCONV *store) - (krb5_context, krb5_rcache,krb5_donot_replay *); - krb5_error_code (KRB5_CALLCONV *expunge) - (krb5_context, krb5_rcache); - krb5_error_code (KRB5_CALLCONV *get_span) - (krb5_context, krb5_rcache,krb5_deltat *); - char *(KRB5_CALLCONV *get_name) - (krb5_context, krb5_rcache); - krb5_error_code (KRB5_CALLCONV *resolve) - (krb5_context, krb5_rcache, char *); -}; - -typedef struct _krb5_rc_ops krb5_rc_ops; - -krb5_error_code krb5_rc_register_type (krb5_context, const krb5_rc_ops *); - -extern const krb5_rc_ops krb5_rc_dfl_ops; - typedef struct _krb5_kt_ops { krb5_magic magic; char *prefix; diff --git a/src/lib/krb5/rcache/ChangeLog b/src/lib/krb5/rcache/ChangeLog index 2b4b65da2..496cd57b5 100644 --- a/src/lib/krb5/rcache/ChangeLog +++ b/src/lib/krb5/rcache/ChangeLog @@ -1,3 +1,11 @@ +2004-06-02 Ken Raeburn + + * rc-int.h (struct krb5_rc_st, struct _krb5_rc_ops, krb5_rc_ops): + Move type definitions here from k5-int.h. + (krb5_rc_register_type, krb5_rc_dfl_ops): Move declarations here + from k5-int.h. + * rc_dfl.c, rcdef.c, rcfns.c: Include rc-int.h. + 2004-05-27 Ezra Peisach * rc_base.c: Include rc-int.h diff --git a/src/lib/krb5/rcache/rc-int.h b/src/lib/krb5/rcache/rc-int.h index 613d7e9f1..d64c34857 100644 --- a/src/lib/krb5/rcache/rc-int.h +++ b/src/lib/krb5/rcache/rc-int.h @@ -25,7 +25,7 @@ * * * This file contains constant and function declarations used in the - * file-based credential cache routines. + * file-based replay cache routines. */ #ifndef __KRB5_RCACHE_INT_H__ @@ -35,4 +35,40 @@ int krb5int_rc_finish_init(void); void krb5int_rc_terminate(void); +struct krb5_rc_st { + krb5_magic magic; + const struct _krb5_rc_ops *ops; + krb5_pointer data; + k5_mutex_t lock; +}; + +struct _krb5_rc_ops { + krb5_magic magic; + char *type; + krb5_error_code (KRB5_CALLCONV *init) + (krb5_context, krb5_rcache,krb5_deltat); /* create */ + krb5_error_code (KRB5_CALLCONV *recover) + (krb5_context, krb5_rcache); /* open */ + krb5_error_code (KRB5_CALLCONV *destroy) + (krb5_context, krb5_rcache); + krb5_error_code (KRB5_CALLCONV *close) + (krb5_context, krb5_rcache); + krb5_error_code (KRB5_CALLCONV *store) + (krb5_context, krb5_rcache,krb5_donot_replay *); + krb5_error_code (KRB5_CALLCONV *expunge) + (krb5_context, krb5_rcache); + krb5_error_code (KRB5_CALLCONV *get_span) + (krb5_context, krb5_rcache,krb5_deltat *); + char *(KRB5_CALLCONV *get_name) + (krb5_context, krb5_rcache); + krb5_error_code (KRB5_CALLCONV *resolve) + (krb5_context, krb5_rcache, char *); +}; + +typedef struct _krb5_rc_ops krb5_rc_ops; + +krb5_error_code krb5_rc_register_type (krb5_context, const krb5_rc_ops *); + +extern const krb5_rc_ops krb5_rc_dfl_ops; + #endif /* __KRB5_RCACHE_INT_H__ */ diff --git a/src/lib/krb5/rcache/rc_dfl.c b/src/lib/krb5/rcache/rc_dfl.c index b16f998c6..c4f845178 100644 --- a/src/lib/krb5/rcache/rc_dfl.c +++ b/src/lib/krb5/rcache/rc_dfl.c @@ -15,6 +15,7 @@ #include "rc_dfl.h" #include "rc_io.h" #include "k5-int.h" +#include "rc-int.h" /* * If NOIOSTUFF is defined at compile time, dfl rcaches will be per-process. diff --git a/src/lib/krb5/rcache/rcdef.c b/src/lib/krb5/rcache/rcdef.c index 726816b4b..73b2eb968 100644 --- a/src/lib/krb5/rcache/rcdef.c +++ b/src/lib/krb5/rcache/rcdef.c @@ -28,6 +28,7 @@ */ #include "k5-int.h" +#include "rc-int.h" #include "rc_dfl.h" const krb5_rc_ops krb5_rc_dfl_ops = diff --git a/src/lib/krb5/rcache/rcfns.c b/src/lib/krb5/rcache/rcfns.c index a98fdd034..d37b4f6ec 100644 --- a/src/lib/krb5/rcache/rcfns.c +++ b/src/lib/krb5/rcache/rcfns.c @@ -29,6 +29,7 @@ */ #include "k5-int.h" +#include "rc-int.h" krb5_error_code KRB5_CALLCONV krb5_rc_initialize (krb5_context context, krb5_rcache id, krb5_deltat span) diff --git a/src/lib/krb5/rcache/ser_rc.c b/src/lib/krb5/rcache/ser_rc.c index 2aa4eb343..0b3d098a8 100644 --- a/src/lib/krb5/rcache/ser_rc.c +++ b/src/lib/krb5/rcache/ser_rc.c @@ -29,6 +29,7 @@ * ser_rcdfl.c - Serialize replay cache context. */ #include "k5-int.h" +#include "rc-int.h" /* * Routines to deal with externalizing krb5_rcache.