From 67f6f264d8aafabe18a1966651a1fbade1038f2c Mon Sep 17 00:00:00 2001 From: Ken Raeburn Date: Wed, 3 Mar 2004 05:48:40 +0000 Subject: [PATCH] * rc_base.c: Delete unused and untested semaphore support git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16140 dc483132-0cff-0310-8789-dd5450dbe970 --- src/lib/krb5/rcache/ChangeLog | 4 ++++ src/lib/krb5/rcache/README | 4 ---- src/lib/krb5/rcache/rc_base.c | 25 ------------------------- 3 files changed, 4 insertions(+), 29 deletions(-) diff --git a/src/lib/krb5/rcache/ChangeLog b/src/lib/krb5/rcache/ChangeLog index d6fa5b309..c71e5f851 100644 --- a/src/lib/krb5/rcache/ChangeLog +++ b/src/lib/krb5/rcache/ChangeLog @@ -1,3 +1,7 @@ +2004-03-03 Ken Raeburn + + * rc_base.c: Delete unused and untested semaphore support. + 2003-08-26 Ken Raeburn * rc_dfl.c (alive): Take a timestamp argument instead of the diff --git a/src/lib/krb5/rcache/README b/src/lib/krb5/rcache/README index 99187cc05..13a45a1d8 100644 --- a/src/lib/krb5/rcache/README +++ b/src/lib/krb5/rcache/README @@ -38,10 +38,6 @@ rcache.c's get_name doesn't fill with zeros unless strncpy does. rc_base.c: -If SEMAPHORE is defined and exists when rc_base.c is -compiled, all access to the type list will be protected by appropriate -semaphore ups and downs. This is untested. - It doesn't take linker magic to preregister types. Just change the typehead initialization in rc_base.c, with an appropriate include file setting the ops. diff --git a/src/lib/krb5/rcache/rc_base.c b/src/lib/krb5/rcache/rc_base.c index da04dfbc0..e86a4fafb 100644 --- a/src/lib/krb5/rcache/rc_base.c +++ b/src/lib/krb5/rcache/rc_base.c @@ -11,9 +11,6 @@ * Base "glue" functions for the replay cache. */ -#ifdef SEMAPHORE -#include -#endif #include "rc_base.h" #define FREE(x) ((void) free((char *) (x))) @@ -26,49 +23,27 @@ struct krb5_rc_typelist static struct krb5_rc_typelist krb5_rc_typelist_dfl = { &krb5_rc_dfl_ops, 0 }; static struct krb5_rc_typelist *typehead = &krb5_rc_typelist_dfl; -#ifdef SEMAPHORE -semaphore ex_typelist = 1; -#endif - krb5_error_code krb5_rc_register_type(krb5_context context, const krb5_rc_ops *ops) { struct krb5_rc_typelist *t; -#ifdef SEMAPHORE - down(&ex_typelist); -#endif for (t = typehead;t && strcmp(t->ops->type,ops->type);t = t->next) ; -#ifdef SEMAPHORE - up(&ex_typelist); -#endif if (t) return KRB5_RC_TYPE_EXISTS; if (!(t = (struct krb5_rc_typelist *) malloc(sizeof(struct krb5_rc_typelist)))) return KRB5_RC_MALLOC; -#ifdef SEMAPHORE - down(&ex_typelist); -#endif t->next = typehead; t->ops = ops; typehead = t; -#ifdef SEMAPHORE - up(&ex_typelist); -#endif return 0; } krb5_error_code krb5_rc_resolve_type(krb5_context context, krb5_rcache *id, char *type) { struct krb5_rc_typelist *t; -#ifdef SEMAPHORE - down(&ex_typelist); -#endif for (t = typehead;t && strcmp(t->ops->type,type);t = t->next) ; -#ifdef SEMAPHORE - up(&ex_typelist); -#endif if (!t) return KRB5_RC_TYPE_NOTFOUND; /* allocate *id? nah */ -- 2.26.2