From e7ed9d3ec084e83a10f3a13894d4b29de1cb4209 Mon Sep 17 00:00:00 2001 From: Theodore Tso Date: Fri, 12 Mar 1999 20:32:45 +0000 Subject: [PATCH] Sample the ccdefault name at the time when we create the context. Free the ccdefault name when we free the os context. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@11272 dc483132-0cff-0310-8789-dd5450dbe970 --- src/lib/krb5/os/ChangeLog | 16 ++++++++++++++++ src/lib/krb5/os/init_os_ctx.c | 6 ++++++ 2 files changed, 22 insertions(+) diff --git a/src/lib/krb5/os/ChangeLog b/src/lib/krb5/os/ChangeLog index 443318761..788a4ab51 100644 --- a/src/lib/krb5/os/ChangeLog +++ b/src/lib/krb5/os/ChangeLog @@ -1,3 +1,19 @@ +1999-03-12 Theodore Ts'o + + * init_os_ctx.c (krb5_os_init_context, krb5_os_free_context): + Sample the ccdefault name at the time when we create the + context. Free the ccdefault name when we free the os + context. + + * ccdefname.c (krb5_cc_default_name, krb5_cc_set_default_name): + Check to make sure the context is valid and return an + error if it isn't. + +1999-03-11 Theodore Ts'o + + * ccdefname.c (get_from_os): Add missing call to get_from_registry + under windows. + Fri Feb 19 20:49:18 1999 Tom Yu * ccdefname.c (get_from_os): Add missing close-paren; also replace diff --git a/src/lib/krb5/os/init_os_ctx.c b/src/lib/krb5/os/init_os_ctx.c index 99d9e6daf..ab325cb26 100644 --- a/src/lib/krb5/os/init_os_ctx.c +++ b/src/lib/krb5/os/init_os_ctx.c @@ -184,6 +184,9 @@ krb5_os_init_context(ctx) os_ctx->time_offset = 0; os_ctx->usec_offset = 0; os_ctx->os_flags = 0; + os_ctx->default_ccname = 0; + + krb5_cc_set_default_name(ctx, NULL); retval = os_init_paths(ctx, FALSE); @@ -241,6 +244,9 @@ krb5_os_free_context(ctx) if (!os_ctx) return; + if (os_ctx->default_ccname) + free(os_ctx->default_ccname); + os_ctx->magic = 0; free(os_ctx); ctx->os_context = 0; -- 2.26.2