components/krb5/patches/023-mem-rcache.patch
changeset 6978 14cbeb78966a
parent 6599 1d033832c5e7
equal deleted inserted replaced
6977:d12ba5c9b5db 6978:14cbeb78966a
    26 # from what we currently offer in Solaris, because they may not want a memory
    26 # from what we currently offer in Solaris, because they may not want a memory
    27 # replay cache, because of the known limitations of this type of cache and may
    27 # replay cache, because of the known limitations of this type of cache and may
    28 # integrate features that don't require replay caches in the the future.
    28 # integrate features that don't require replay caches in the the future.
    29 # Patch source: in-house
    29 # Patch source: in-house
    30 #
    30 #
    31 diff --git a/src/lib/krb5/krb/srv_rcache.c b/src/lib/krb5/krb/srv_rcache.c
       
    32 --- a/src/lib/krb5/krb/srv_rcache.c
    31 --- a/src/lib/krb5/krb/srv_rcache.c
    33 +++ b/src/lib/krb5/krb/srv_rcache.c
    32 +++ b/src/lib/krb5/krb/srv_rcache.c
    34 @@ -39,6 +39,7 @@ krb5_get_server_rcache(krb5_context context, const krb5_data *piece,
    33 @@ -39,6 +39,7 @@ krb5_get_server_rcache(krb5_context context, const krb5_data *piece,
    35      krb5_error_code retval;
    34      krb5_error_code retval;
    36      unsigned int i;
    35      unsigned int i;
    77  #endif
    76  #endif
    78 +    }
    77 +    }
    79  
    78  
    80      if (k5_buf_status(&buf) != 0)
    79      if (k5_buf_status(&buf) != 0)
    81          return ENOMEM;
    80          return ENOMEM;
    82 diff --git a/src/lib/krb5/rcache/Makefile.in b/src/lib/krb5/rcache/Makefile.in
       
    83 --- a/src/lib/krb5/rcache/Makefile.in
    81 --- a/src/lib/krb5/rcache/Makefile.in
    84 +++ b/src/lib/krb5/rcache/Makefile.in
    82 +++ b/src/lib/krb5/rcache/Makefile.in
    85 @@ -13,7 +13,8 @@ STLIBOBJS = \
    83 @@ -13,7 +13,8 @@ STLIBOBJS = \
    86  	rc_none.o	\
    84  	rc_none.o	\
    87  	rc_conv.o	\
    85  	rc_conv.o	\
   110 +	$(srcdir)/t_replay.c	\
   108 +	$(srcdir)/t_replay.c	\
   111 +	$(srcdir)/rc_mem.c
   109 +	$(srcdir)/rc_mem.c
   112  
   110  
   113  ##DOS##LIBOBJS = $(OBJS)
   111  ##DOS##LIBOBJS = $(OBJS)
   114  
   112  
   115 diff --git a/src/lib/krb5/rcache/rc-int.h b/src/lib/krb5/rcache/rc-int.h
       
   116 --- a/src/lib/krb5/rcache/rc-int.h
   113 --- a/src/lib/krb5/rcache/rc-int.h
   117 +++ b/src/lib/krb5/rcache/rc-int.h
   114 +++ b/src/lib/krb5/rcache/rc-int.h
   118 @@ -87,5 +87,6 @@ krb5_error_code krb5_rc_register_type(krb5_context, const krb5_rc_ops *);
   115 @@ -87,5 +87,6 @@ krb5_error_code krb5_rc_register_type(krb5_context, const krb5_rc_ops *);
   119  
   116  
   120  extern const krb5_rc_ops krb5_rc_dfl_ops;
   117  extern const krb5_rc_ops krb5_rc_dfl_ops;
   121  extern const krb5_rc_ops krb5_rc_none_ops;
   118  extern const krb5_rc_ops krb5_rc_none_ops;
   122 +extern const krb5_rc_ops krb5_rc_mem_ops;
   119 +extern const krb5_rc_ops krb5_rc_mem_ops;
   123  
   120  
   124  #endif /* __KRB5_RCACHE_INT_H__ */
   121  #endif /* __KRB5_RCACHE_INT_H__ */
   125 diff --git a/src/lib/krb5/rcache/rc_base.c b/src/lib/krb5/rcache/rc_base.c
       
   126 --- a/src/lib/krb5/rcache/rc_base.c
   122 --- a/src/lib/krb5/rcache/rc_base.c
   127 +++ b/src/lib/krb5/rcache/rc_base.c
   123 +++ b/src/lib/krb5/rcache/rc_base.c
   128 @@ -13,19 +13,35 @@
   124 @@ -13,19 +13,35 @@
   129  #include "rc_base.h"
   125  #include "rc_base.h"
   130  #include "rc-int.h"
   126  #include "rc-int.h"
   234 +    } else
   230 +    } else
   235 +	return (char *) 0;
   231 +	return (char *) 0;
   236  }
   232  }
   237  
   233  
   238  krb5_error_code
   234  krb5_error_code
   239 diff --git a/src/lib/krb5/rcache/rc_dfl.c b/src/lib/krb5/rcache/rc_dfl.c
       
   240 --- a/src/lib/krb5/rcache/rc_dfl.c
   235 --- a/src/lib/krb5/rcache/rc_dfl.c
   241 +++ b/src/lib/krb5/rcache/rc_dfl.c
   236 +++ b/src/lib/krb5/rcache/rc_dfl.c
   242 @@ -249,6 +249,9 @@ krb5_rc_dfl_close_no_free(krb5_context context, krb5_rcache id)
   237 @@ -249,6 +249,9 @@ krb5_rc_dfl_close_no_free(krb5_context context, krb5_rcache id)
   243      struct dfl_data *t = (struct dfl_data *)id->data;
   238      struct dfl_data *t = (struct dfl_data *)id->data;
   244      struct authlist *q;
   239      struct authlist *q;
   263          free(t);
   258          free(t);
   264 +	id->data = NULL;
   259 +	id->data = NULL;
   265      }
   260      }
   266      return retval;
   261      return retval;
   267  }
   262  }
   268 diff --git a/src/lib/krb5/rcache/rc_io.c b/src/lib/krb5/rcache/rc_io.c
       
   269 --- a/src/lib/krb5/rcache/rc_io.c
   263 --- a/src/lib/krb5/rcache/rc_io.c
   270 +++ b/src/lib/krb5/rcache/rc_io.c
   264 +++ b/src/lib/krb5/rcache/rc_io.c
   271 @@ -56,7 +56,10 @@ getdir(void)
   265 @@ -56,7 +56,10 @@ getdir(void)
   272  #else
   266  #else
   273          if (!(dir = getenv("TMPDIR"))) {
   267          if (!(dir = getenv("TMPDIR"))) {