diff options
| author | Alexandra Ellwood <lxs@mit.edu> | 2000-04-13 22:06:53 +0000 |
|---|---|---|
| committer | Alexandra Ellwood <lxs@mit.edu> | 2000-04-13 22:06:53 +0000 |
| commit | 08a7da0a204ec86eaaec715010657affbd896805 (patch) | |
| tree | 326d3f22b6ddced15b7bcdf0c2c4eea36373b040 /src/lib | |
| parent | 3a1ac0c3413047434ec1fb329f471bacc422fb5b (diff) | |
| download | krb5-08a7da0a204ec86eaaec715010657affbd896805.tar.gz krb5-08a7da0a204ec86eaaec715010657affbd896805.tar.xz krb5-08a7da0a204ec86eaaec715010657affbd896805.zip | |
2000-4-13 Alexandra Ellwood <lxs@mit.edu>
* init_os_ctx.c: Added support to store a krb5_principal in the os_context
along with the default ccache name (if known, this principal is the same
as the last time we looked at the ccache.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@12169 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/lib')
| -rw-r--r-- | src/lib/krb5/os/ChangeLog | 6 | ||||
| -rw-r--r-- | src/lib/krb5/os/init_os_ctx.c | 22 |
2 files changed, 20 insertions, 8 deletions
diff --git a/src/lib/krb5/os/ChangeLog b/src/lib/krb5/os/ChangeLog index 768f1e3a91..c0dc2c574a 100644 --- a/src/lib/krb5/os/ChangeLog +++ b/src/lib/krb5/os/ChangeLog @@ -1,3 +1,9 @@ +2000-4-13 Alexandra Ellwood <lxs@mit.edu> + + * init_os_ctx.c: Added support to store a krb5_principal in the os_context + along with the default ccache name (if known, this principal is the same + as the last time we looked at the ccache. + 2000-03-20 Miro Jurisic <meeroh@mit.edu> * def_realm.c (krb5_free_default_realm): Added, use to free diff --git a/src/lib/krb5/os/init_os_ctx.c b/src/lib/krb5/os/init_os_ctx.c index 48d8bc2ada..5222e6af8a 100644 --- a/src/lib/krb5/os/init_os_ctx.c +++ b/src/lib/krb5/os/init_os_ctx.c @@ -404,7 +404,8 @@ krb5_os_init_context(ctx) os_ctx->usec_offset = 0; os_ctx->os_flags = 0; os_ctx->default_ccname = 0; - + os_ctx->default_ccprincipal = 0; + krb5_cc_set_default_name(ctx, NULL); retval = os_init_paths(ctx); @@ -519,17 +520,22 @@ krb5_os_free_context(ctx) if (!os_ctx) return; - if (os_ctx->default_ccname) { + if (os_ctx->default_ccname) { free(os_ctx->default_ccname); - os_ctx->default_ccname = 0; - } + os_ctx->default_ccname = 0; + } + + if (os_ctx->default_ccprincipal) { + krb5_free_principal (ctx, os_ctx->default_ccprincipal); + os_ctx->default_ccprincipal = 0; + } os_ctx->magic = 0; free(os_ctx); ctx->os_context = 0; - if (ctx->profile) { - profile_release(ctx->profile); - ctx->profile = 0; - } + if (ctx->profile) { + profile_release(ctx->profile); + ctx->profile = 0; + } } |
