lib/krb5: allow access to anonymous mcache entries via name
authorStefan Metzmacher <metze@samba.org>
Wed, 1 Apr 2020 21:09:57 +0000 (23:09 +0200)
committerJoseph Sutton <josephsutton@catalyst.net.nz>
Wed, 3 May 2023 04:13:16 +0000 (16:13 +1200)
commit4d44b1cf5b8c2fa02aa19a7d82797506e49be44c
treed6ea33eb92bbb3a2bd26c81ca58caccb50d85dff
parent24a3063d64dd712e5d107f7917c8125191431ecd
lib/krb5: allow access to anonymous mcache entries via name

The idea of anonymous mcache entries is that they won't be
included in the global ccache collection. But at the
same time they should be accessable via a name.

There might be better ways to do this, e.g. let the
caller specify a name like 'anonymous-application-key1'.

But we need a way to use MEMORY ccaches for different
security contexts, without the fear that they are randomly
used from the global list.

The better way would have been to opt-in in order to
fill the global ccache collection.

See 7e858c51b690ff0322766b328f60b41bc38d4ae3 for (at least part)
of the mess... there should not be a single global ccache collection
for MEMORY: ccaches! That is a security problem for applications
which used to be able to switch between different MEMORY ccaches!

Signed-off-by: Stefan Metzmacher <metze@samba.org>
lib/krb5/mcache.c