]> git.ipfire.org Git - thirdparty/krb5.git/commit
Simplify krb5_cccol_have_content() 1179/head
authorGreg Hudson <ghudson@mit.edu>
Wed, 31 Mar 2021 19:00:21 +0000 (15:00 -0400)
committerGreg Hudson <ghudson@mit.edu>
Mon, 5 Apr 2021 21:49:58 +0000 (17:49 -0400)
commit52c34009598357d6b276eee09a9778ada09b002b
treea5f8da3ea5a3f59889e80c4b38eae05d71b67f76
parent795ebba8c039be172ab93cd41105c73ffdba0fdb
Simplify krb5_cccol_have_content()

For the purposes of determining whether Kerberos credentials are
present, just check for an initialized ccache (as detected by
krb5_cc_get_principal()), not one with credentials in it.  For KCM and
KEYRING caches, this changes avoids the O(n) expense of starting an
iteration.

Also fix a potential memory leak if a cache is found after an error is
saved.

ticket: 8998 (new)
src/include/krb5/krb5.hin
src/lib/krb5/ccache/cccursor.c