From 804a7ea8bffb1b26a0e8632eb8fb61ef30cdbf68 Mon Sep 17 00:00:00 2001 From: neilbrown Date: Tue, 28 Mar 2006 00:49:29 +0000 Subject: [PATCH] Must still use knowledge of the glue context for pre-1.4 versions of MIT krb5 We need to get access to the internal krb5 context pointer for older (pre-1.4) versions of MIT Kerberos. We get a pointer to the gss glue's context. Get the right pointer before accessing the context information. (really this time) --- ChangeLog | 9 +++++++++ utils/gssd/context_mit.c | 13 ++++++++++++- 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 5b59000..663fa5b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2006-03-28 kwc@citi.umich.edu + Must still use knowledge of the glue context for pre-1.4 versions of MIT krb5 + + We need to get access to the internal krb5 context pointer for + older (pre-1.4) versions of MIT Kerberos. We get a pointer to + the gss glue's context. Get the right pointer before accessing + the context information. + (really this time) + 2006-03-28 kwc@citi.umich.edu Remove unused groups variable from get_ids() which was causing a compiler warning. diff --git a/utils/gssd/context_mit.c b/utils/gssd/context_mit.c index ba94fd8..c804f3a 100644 --- a/utils/gssd/context_mit.c +++ b/utils/gssd/context_mit.c @@ -294,10 +294,21 @@ write_keyblock(char **p, char *end, struct _krb5_keyblock *arg) return 0; } +/* + * We really shouldn't know about glue-layer context structure, but + * we need to get at the real krb5 context pointer. This should be + * removed as soon as we say there is no support for MIT Kerberos + * prior to 1.4 -- which gives us "legal" access to the context info. + */ +typedef struct gss_union_ctx_id_t { + gss_OID mech_type; + gss_ctx_id_t internal_ctx_id; +} gss_union_ctx_id_desc, *gss_union_ctx_id_t; + int serialize_krb5_ctx(gss_ctx_id_t ctx, gss_buffer_desc *buf) { - krb5_gss_ctx_id_t kctx = (krb5_gss_ctx_id_t)ctx; + krb5_gss_ctx_id_t kctx = ((gss_union_ctx_id_t)ctx)->internal_ctx_id; char *p, *end; static int constant_one = 1; static int constant_zero = 0; -- 2.39.5