From: Scott McGuire Date: Fri, 4 Feb 2000 21:55:56 +0000 (+0000) Subject: Removed calls that destroyed and recreated ccapi_data->NamedCache if it exists in... X-Git-Tag: krb5-1.2-beta1~125 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=46f346baf59c2da07e148adf52fd2f04f1f78bb5;p=krb5.git Removed calls that destroyed and recreated ccapi_data->NamedCache if it exists in krb5_stdcc_initialize(); instead close and call create on it again git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@11994 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/lib/krb5/ccache/ccapi/ChangeLog b/src/lib/krb5/ccache/ccapi/ChangeLog index caadf1c13..be2bb8f04 100644 --- a/src/lib/krb5/ccache/ccapi/ChangeLog +++ b/src/lib/krb5/ccache/ccapi/ChangeLog @@ -1,3 +1,11 @@ +2000-02-04 Scott McGuire + + * stdcc.c (krb5_stdcc_initialize): Removed calls that destroyed + and recreated ccapi_data->NamedCache; instead close + and call create on it again. (This makes sure the data stays + in the same cache the whole time so external pointers don't + get confused.) + 1999-11-22 Miro Jurisic * stdcc.h, stdcc_util.h: use CCache2.h under MacOS for CCAPI v2 diff --git a/src/lib/krb5/ccache/ccapi/stdcc.c b/src/lib/krb5/ccache/ccapi/stdcc.c index 36eed9d22..ed233b068 100644 --- a/src/lib/krb5/ccache/ccapi/stdcc.c +++ b/src/lib/krb5/ccache/ccapi/stdcc.c @@ -331,16 +331,9 @@ krb5_error_code KRB5_CALLCONV krb5_stdcc_initialize ccapi_data = id->data; - if (!ccapi_data->NamedCache) { - err = cc_open(gCntrlBlock, ccapi_data->cache_name, - CC_CRED_V5, 0L, - &ccapi_data->NamedCache); - if (err != CC_NOERROR) - ccapi_data->NamedCache = NULL; - } if (ccapi_data->NamedCache) - cc_destroy(gCntrlBlock, &ccapi_data->NamedCache); + cc_close(gCntrlBlock, &ccapi_data->NamedCache); err = cc_create(gCntrlBlock, ccapi_data->cache_name, cName, CC_CRED_V5, 0L, &ccapi_data->NamedCache);