From: Tom Yu Date: Thu, 10 Jul 2003 22:53:02 +0000 (+0000) Subject: * acquire_cred.c (acquire_init_cred): Close the ccache if X-Git-Tag: krb5-1.4-beta1~821 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=d74bfe2037cf48849d4e6171796d45c95c601fb8;p=krb5.git * acquire_cred.c (acquire_init_cred): Close the ccache if krb5_cc_set_flags() fails, as krb5int_cc_default succeeds even if the file is not there, but krb5_cc_set_flags will fail in turning off OPENCLOSE mode if the file can't be opened. Thanks to Kent Wu. ticket: 1656 tags: pullup git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@15680 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/lib/gssapi/krb5/ChangeLog b/src/lib/gssapi/krb5/ChangeLog index 9cccd9d34..814d61c30 100644 --- a/src/lib/gssapi/krb5/ChangeLog +++ b/src/lib/gssapi/krb5/ChangeLog @@ -1,3 +1,10 @@ +2003-07-10 Tom Yu + + * acquire_cred.c (acquire_init_cred): Close the ccache if + krb5_cc_set_flags() fails, as krb5int_cc_default succeeds even if + the file is not there, but krb5_cc_set_flags will fail in turning + off OPENCLOSE mode if the file can't be opened. Thanks to Kent Wu. + 2003-06-13 Tom Yu * init_sec_context.c (make_ap_req_v1): Free checksum_data if diff --git a/src/lib/gssapi/krb5/acquire_cred.c b/src/lib/gssapi/krb5/acquire_cred.c index 2c620b940..27cbab0bb 100644 --- a/src/lib/gssapi/krb5/acquire_cred.c +++ b/src/lib/gssapi/krb5/acquire_cred.c @@ -201,6 +201,7 @@ acquire_init_cred(context, minor_status, desired_name, output_princ, cred) flags = 0; /* turns off OPENCLOSE mode */ if ((code = krb5_cc_set_flags(context, ccache, flags))) { + (void)krb5_cc_close(context, ccache); *minor_status = code; return(GSS_S_CRED_UNAVAIL); }