Skip to content

Commit

Permalink
* stdcc.c (krb5_stdcc_destroy): Do not mask KRB5_FCC_NOFILE error
Browse files Browse the repository at this point in the history
on destroy.


git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@12117 dc483132-0cff-0310-8789-dd5450dbe970
  • Loading branch information
dalmeida committed Mar 16, 2000
1 parent 6df855b commit 06260fe
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 6 deletions.
5 changes: 5 additions & 0 deletions src/lib/krb5/ccache/ccapi/ChangeLog
@@ -1,3 +1,8 @@
2000-03-15 Danilo Almeida <dalmeida@mit.edu>

* stdcc.c (krb5_stdcc_destroy): Do not mask KRB5_FCC_NOFILE error
on destroy.

2000-02-10 Miro Jurisic <meeroh@mit.edu>

* stdcc_util.c: Fixed lxs' fix
Expand Down
16 changes: 10 additions & 6 deletions src/lib/krb5/ccache/ccapi/stdcc.c
Expand Up @@ -620,28 +620,32 @@ 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)
free(ccapi_data->cache_name);
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;
}

/*
Expand Down

0 comments on commit 06260fe

Please sign in to comment.