From 77f6ac1618d819b4039c8f05d6acec86449726b7 Mon Sep 17 00:00:00 2001 From: Danilo Almeida Date: Thu, 16 Mar 2000 00:44:18 +0000 Subject: [PATCH] * stdcc.c (krb5_stdcc_destroy): Do not mask KRB5_FCC_NOFILE error on destroy. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@12117 dc483132-0cff-0310-8789-dd5450dbe970 --- src/lib/krb5/ccache/ccapi/ChangeLog | 5 +++++ src/lib/krb5/ccache/ccapi/stdcc.c | 16 ++++++++++------ 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/src/lib/krb5/ccache/ccapi/ChangeLog b/src/lib/krb5/ccache/ccapi/ChangeLog index a97d97f00..e4dac98dd 100644 --- a/src/lib/krb5/ccache/ccapi/ChangeLog +++ b/src/lib/krb5/ccache/ccapi/ChangeLog @@ -1,3 +1,8 @@ +2000-03-15 Danilo Almeida + + * stdcc.c (krb5_stdcc_destroy): Do not mask KRB5_FCC_NOFILE error + on destroy. + 2000-02-10 Miro Jurisic * stdcc_util.c: Fixed lxs' fix diff --git a/src/lib/krb5/ccache/ccapi/stdcc.c b/src/lib/krb5/ccache/ccapi/stdcc.c index ed233b068..a17cd0265 100644 --- a/src/lib/krb5/ccache/ccapi/stdcc.c +++ b/src/lib/krb5/ccache/ccapi/stdcc.c @@ -620,13 +620,11 @@ krb5_stdcc_destroy (krb5_context context, krb5_ccache id) int err; krb5_error_code retval; stdccCacheDataPtr ccapi_data = id->data; - + if ((retval = stdcc_setup(context, ccapi_data))) { - if (retval == KRB5_FCC_NOFILE) - return 0; return retval; } - + /* free memory associated with the krb5_ccache */ if (ccapi_data) { if (ccapi_data->cache_name) @@ -634,14 +632,20 @@ krb5_stdcc_destroy (krb5_context context, krb5_ccache id) if (ccapi_data->NamedCache) { /* destroy the named cache */ err = cc_destroy(gCntrlBlock, &ccapi_data->NamedCache); + retval = cc_err_xlate(err); cache_changed(); } free(ccapi_data); id->data = NULL; } free(id); - - return cc_err_xlate(err); + + /* If the cache does not exist when we tried to destroy it, + that's fine. That means someone else destryoed it since + we resolved it. */ + if (retval == KRB5_FCC_NOFILE) + return 0; + return retval; } /* -- 2.26.2