krb5_init_context() calls cc_context_get_default_ccache_name()
Alexandra Ellwood
lxs at MIT.EDU
Mon Aug 2 17:29:04 EDT 2004
Hi,
Currently krb5_init_context() calls into CCAPI when it resets the
ccache name in the context. It does this by calling
krb5_cc_set_default_name(context, NULL).
krb5_cc_set_default_name(context, NULL) sets the ccache name in the
context to its "default" value by calling get_from_os(). On CCAPI
platforms it calls cc_context_get_default_ccache_name().
The problem is that cc_context_get_default_ccache_name() produces an
IPC call. This means that you pay for the overhead of an IPC call just
for initializing a context. It also means that the CCAPI server needs
to be present to answer the request, even though the context may never
use the ccache.
I would like to change the behavior so that it lazily looks up the
default ccache. Basically when you call
krb5_cc_set_default_name(context, NULL), it will just set the ccache
name in the context to the NULL string and free the old one. When you
call krb5_cc_default_name(context), it will look at the environment
variable and then call get_from_os(). Basically I just want to defer
the actual work to when the library needs to look up the ccache name.
Although this changes when the default ccache is looked up, I can't
think of any practical problems with it based on how callers use
krb5_contexts. Can anyone else think of any problems?
I would like this change for krb5-1.4.
--lxs
-----------------------------------------------------------------------
Alexandra Ellwood lxs at mit.edu
MIT Information Services & Technology http://mit.edu/lxs/www/
-----------------------------------------------------------------------
More information about the krbdev
mailing list