gssapi/krb5: delete_sec_context must close ccache if CLOSE_CCACHE
commit99416eeeadb68984e80cc1fe85028d4bc796f981
authorJeffrey Altman <jaltman@secure-endpoints.com>
Mon, 29 Jun 2020 13:51:49 +0000 (29 09:51 -0400)
committerJeffrey Altman <jaltman@auristor.com>
Mon, 29 Jun 2020 15:40:48 +0000 (29 11:40 -0400)
treeab8c333df9e60d1d4a19c8d55224dbbcd5343dff
parent226a3ba7d70405de3a1bec4959dde4b3eb6f5b06
gssapi/krb5: delete_sec_context must close ccache if CLOSE_CCACHE

_gsskrb5_init_sec_context() when called with GSS_C_NO_CREDENTIAL
opens the default ccache and sets the CLOSE_CCACHE flag indicating
that the ccache lifetime is tied to the gsskrb5_ctx.   When
_gsskrb5_delete_sec_context() is called, it must close the ccache
if the CLOSE_CCACHE flag is set.  Otherwise, the ccache resources
will leak.

Leaked since 39fe446983c0e70a0d11b8824684ad912c8e2206.

Change-Id: I8d0faab1e844d68fe71b11b715f8d88fcd2f4af7
lib/gssapi/krb5/delete_sec_context.c