summaryrefslogtreecommitdiffstats
path: root/utils
diff options
context:
space:
mode:
authorneilbrown <neilbrown>2006-03-28 00:49:29 +0000
committerneilbrown <neilbrown>2006-03-28 00:49:29 +0000
commit804a7ea8bffb1b26a0e8632eb8fb61ef30cdbf68 (patch)
treee3ae8f3050e0b4a93f2db838b76044b7bd2ef4d1 /utils
parent8adc52dd957f1f7e392d8efa33a925c2312ba1b1 (diff)
downloadnfs-utils-804a7ea8bffb1b26a0e8632eb8fb61ef30cdbf68.tar.gz
nfs-utils-804a7ea8bffb1b26a0e8632eb8fb61ef30cdbf68.tar.xz
nfs-utils-804a7ea8bffb1b26a0e8632eb8fb61ef30cdbf68.zip
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)
Diffstat (limited to 'utils')
-rw-r--r--utils/gssd/context_mit.c13
1 files changed, 12 insertions, 1 deletions
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;