From f8d4e9aaad429fd6fac6504a527ab0258f47b854 Mon Sep 17 00:00:00 2001 From: Alexandra Ellwood Date: Tue, 18 Mar 2008 19:25:16 +0000 Subject: CCacheServer should track client iterators The CCacheServer needs to track client iterators so that if a client crashes while iterating the resources on the server for that iterator are freed. ticket: new git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20279 dc483132-0cff-0310-8789-dd5450dbe970 --- src/ccapi/server/ccs_cache_collection.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) (limited to 'src/ccapi/server/ccs_cache_collection.c') diff --git a/src/ccapi/server/ccs_cache_collection.c b/src/ccapi/server/ccs_cache_collection.c index 2500c2974..02d4d8f7d 100644 --- a/src/ccapi/server/ccs_cache_collection.c +++ b/src/ccapi/server/ccs_cache_collection.c @@ -229,7 +229,9 @@ static cc_int32 ccs_cache_collection_find_ccache_by_name (ccs_cache_collection_t if (!out_ccache ) { err = cci_check_error (ccErrBadParam); } if (!err) { - err = ccs_ccache_list_new_iterator (in_cache_collection->ccaches, &iterator); + err = ccs_ccache_list_new_iterator (in_cache_collection->ccaches, + CCS_PIPE_NULL, + &iterator); } while (!err) { @@ -374,7 +376,9 @@ cc_int32 ccs_cache_collection_find_credentials_iterator (ccs_cache_collection_t if (!out_credentials_iterator) { err = cci_check_error (ccErrBadParam); } if (!err) { - err = ccs_ccache_list_new_iterator (in_cache_collection->ccaches, &iterator); + err = ccs_ccache_list_new_iterator (in_cache_collection->ccaches, + CCS_PIPE_NULL, + &iterator); } while (!err) { @@ -473,6 +477,7 @@ static cc_int32 ccs_cache_collection_get_default_ccache (ccs_cache_collection_t ccs_ccache_list_iterator_t iterator = NULL; err = ccs_ccache_list_new_iterator (in_cache_collection->ccaches, + CCS_PIPE_NULL, &iterator); if (!err) { @@ -916,6 +921,7 @@ static cc_int32 ccs_cache_collection_create_new_ccache (ccs_cache_collection_t i /* ------------------------------------------------------------------------ */ static cc_int32 ccs_cache_collection_new_ccache_iterator (ccs_cache_collection_t io_cache_collection, + ccs_pipe_t in_client_pipe, cci_stream_t in_request_data, cci_stream_t io_reply_data) { @@ -928,6 +934,7 @@ static cc_int32 ccs_cache_collection_new_ccache_iterator (ccs_cache_collection_ if (!err) { err = ccs_ccache_list_new_iterator (io_cache_collection->ccaches, + in_client_pipe, &ccache_iterator); } @@ -1070,7 +1077,9 @@ static cc_int32 ccs_cache_collection_unlock (ccs_pipe_t in_client_pi } else if (in_request_name == cci_context_new_ccache_iterator_msg_id) { err = ccs_cache_collection_new_ccache_iterator (io_cache_collection, - in_request_data, reply_data); + in_client_pipe, + in_request_data, + reply_data); } else if (in_request_name == cci_context_lock_msg_id) { err = ccs_cache_collection_lock (in_client_pipe, in_reply_pipe, -- cgit