--- clean/lib/gssapi/mechglue/g_accept_sec_context.c	Wed Jan  9 17:27:44 2002
+++ dirty/lib/gssapi/mechglue/g_accept_sec_context.c	Tue Jun 12 13:00:38 2001
@@ -166,7 +166,14 @@
 	     * then call gss_import_name() to create
 	     * the union name struct cast to src_name
 	     */
+/*ANDROS: src_name is never null, it is a ptr from the gss_accept_sec_context
+*caller.  internal_name may or may not be set by the mechanism. so, don't
+* call __gss_convert_name_to_union_name which sets the src_name
+* unless the internal name is set
+* by the above mech->gss_accept_sec_context.
 	    if (src_name != NULL && status == GSS_S_COMPLETE) {
+*/
+	    if (internal_name != NULL && status == GSS_S_COMPLETE) {
 		temp_status = __gss_convert_name_to_union_name(
 		       &temp_minor_status, mech, internal_name, src_name);
 		if (temp_status != GSS_S_COMPLETE) {
--- clean/lib/gssapi/mechglue/g_context_time.c	Wed Jan  9 17:27:44 2002
+++ dirty/lib/gssapi/mechglue/g_compare_name.c	Tue Feb 13 12:50:45 2001
@@ -1,4 +1,4 @@
-/* #ident  "@(#)gss_context_time.c 1.8     95/08/07 SMI" */
+/* #ident  "@(#)gss_compare_name.c 1.13     95/08/02 SMI" */
 
 /*
  * Copyright 1996 by Sun Microsystems, Inc.
@@ -23,51 +23,135 @@
  */
 
 /*
- *  glue routines for gss_context_time
+ *  glue routine for gss_compare_name
+ *
  */
 
 #include "mglueP.h"
+#ifdef HAVE_STDLIB_H
+#include <stdlib.h>
+#endif
+#include <string.h>
+
+#define g_OID_equal(o1,o2) \
+   (((o1)->length == (o2)->length) && \
+    (memcmp((o1)->elements,(o2)->elements,(int) (o1)->length) == 0))
 
 OM_uint32 KRB5_CALLCONV
-gss_context_time (minor_status,
-                  context_handle,
-                  time_rec)
+gss_compare_name (minor_status,
+                  name1,
+                  name2,
+                  name_equal)
 
 OM_uint32 *		minor_status;
-gss_ctx_id_t		context_handle;
-OM_uint32 *		time_rec;
+gss_name_t		name1;
+gss_name_t		name2;
+int *			name_equal;
 
 {
-    OM_uint32		status;
-    gss_union_ctx_id_t	ctx;
+    OM_uint32		major_status, temp_minor;
+    gss_union_name_t	union_name1, union_name2;
     gss_mechanism	mech;
-
+    gss_name_t		internal_name;
+    
     gss_initialize();
 
-    if (context_handle == GSS_C_NO_CONTEXT)
-	return GSS_S_NO_CONTEXT;
-    
+    if (name1 == 0 || name2 == 0) {
+	if (name_equal)
+	    *name_equal = 0;
+	return GSS_S_BAD_NAME;
+    }
+
+    union_name1 = (gss_union_name_t) name1;
+    union_name2 = (gss_union_name_t) name2;
     /*
-     * select the approprate underlying mechanism routine and
-     * call it.
+     * Try our hardest to make union_name1 be the mechanism-specific
+     * name.  (Of course we can't if both names aren't
+     * mechanism-specific.)
      */
-    
-    ctx = (gss_union_ctx_id_t) context_handle;
-    mech = __gss_get_mechanism (ctx->mech_type);
-    
-    if (mech) {
+    if (union_name1->mech_type == 0) {
+	union_name1 = (gss_union_name_t) name2;
+	union_name2 = (gss_union_name_t) name1;
+    }
+    /*
+     * If union_name1 is mechanism specific, then fetch its mechanism
+     * information.
+     */
+    if (union_name1->mech_type) {
+	mech = __gss_get_mechanism (union_name1->mech_type);
+	if (!mech)
+	    return (GSS_S_BAD_MECH);
+	if (!mech->gss_compare_name)
+	    return (GSS_S_BAD_BINDINGS);
+    }
+	
+    if (name_equal == NULL)
+	return GSS_S_COMPLETE;
 
-	if (mech->gss_context_time)
-	    status = mech->gss_context_time(
-					    mech->context,
-					    minor_status,
-					    ctx->internal_ctx_id,
-					    time_rec);
-	else
-	    status = GSS_S_BAD_BINDINGS;
+    *name_equal = 0;		/* Default to *not* equal.... */
 
-	return(status);
+    /*
+     * First case... both names are mechanism-specific
+     */
+    if (union_name1->mech_type && union_name2->mech_type) {
+	if (!g_OID_equal(union_name1->mech_type, union_name2->mech_type))
+	    return (GSS_S_COMPLETE);
+	if ((union_name1->mech_name == 0) || (union_name2->mech_name == 0))
+	    /* should never happen */
+	    return (GSS_S_BAD_NAME);
+	return (mech->gss_compare_name(mech->context, minor_status,
+				       union_name1->mech_name,
+				       union_name2->mech_name, name_equal));
+	
+    }
+
+    /*
+     * Second case... both names are NOT mechanism specific.
+     * 
+     * All we do here is make sure the two name_types are equal and then
+     * that the external_names are equal. Note the we do not take care
+     * of the case where two different external names map to the same
+     * internal name. We cannot determine this, since we as yet do not
+     * know what mechanism to use for calling the underlying
+     * gss_import_name().
+     */
+    if (!union_name1->mech_type && !union_name2->mech_type) {
+	if (!g_OID_equal(union_name1->name_type, union_name2->name_type))
+	    return (GSS_S_COMPLETE);
+	if ((union_name1->external_name->length !=
+	     union_name2->external_name->length) ||
+	    (memcmp(union_name1->external_name->value,
+		    union_name2->external_name->value,
+		    union_name1->external_name->length) != 0))
+	    return (GSS_S_COMPLETE);
+	*name_equal = 1;
+	return (GSS_S_COMPLETE);
+    }
+
+    /*
+     * Final case... one name is mechanism specific, the other isn't.
+     * 
+     * We attempt to convert the general name to the mechanism type of
+     * the mechanism-specific name, and then do the compare.  If we
+     * can't import the general name, then we return that the name is
+     * _NOT_ equal.
+     */
+    if (union_name2->mech_type) {
+	/* We make union_name1 the mechanism specific name. */
+	union_name1 = (gss_union_name_t) name2;
+	union_name2 = (gss_union_name_t) name1;
     }
+    major_status = __gss_import_internal_name(minor_status,
+					      union_name1->mech_type,
+					      union_name2,
+					      &internal_name);
+    if (major_status != GSS_S_COMPLETE)
+	return (GSS_S_COMPLETE);
+    major_status = mech->gss_compare_name(mech->context, minor_status,
+					  union_name1->mech_name,
+					  internal_name, name_equal);
+    __gss_release_internal_name(&temp_minor, union_name1->mech_type,
+				&internal_name);
+    return (major_status);
     
-    return(GSS_S_NO_CONTEXT);
 }
--- clean/lib/gssapi/mechglue/g_initialize.c	Wed Jan  9 17:27:44 2002
+++ dirty/lib/gssapi/mechglue/g_initialize.c	Tue May  1 10:17:33 2001
@@ -50,6 +50,9 @@
     (memcmp((o1)->elements,(o2)->elements,(int) (o1)->length) == 0))
 
 extern gss_mechanism krb5_gss_initialize();
+#ifdef SPKM
+extern gss_mechanism spkm3_gss_initialize();
+#endif SPKM
 
 static int _gss_initialized = 0;
 
@@ -153,7 +156,13 @@
     /* Initialize the krb5 mechanism */
     mech = (gss_mechanism)krb5_gss_initialize();
     if (mech)
-	add_mechanism (mech, 1);
+	      add_mechanism (mech, 1);
+#ifdef SPKM
+    /* Initialize the spkm3 mechanism */
+    mech = (gss_mechanism)spkm3_gss_initialize();
+    if (mech)
+	      add_mechanism (mech, 1);
+#endif SPKM
 
 #endif /* USE_SOLARIS_SHARED_LIBRARIES */
 
--- clean/lib/gssapi/mechglue/Makefile.static	Tue Feb 26 12:42:08 2002
+++ dirty/lib/gssapi/mechglue/Makefile.static	Mon Jul 23 08:28:26 2001
@@ -0,0 +1,48 @@
+# set BUILDTOP to the location of your distribution 
+BUILDTOP=/usr/local/src/krb5-1.2.3/src
+
+OBJS = g_accept_sec_context.o g_acquire_cred.o g_compare_name.o	\
+       g_context_time.o g_delete_sec_context.o g_dsp_name.o g_dsp_status.o \
+       g_exp_sec_context.o g_glue.o g_imp_name.o g_imp_sec_context.o	\
+			 g_indicate_mechs.o g_init_sec_context.o g_initialize.o 	\
+			 g_inq_context.o g_inq_cred.o g_inq_names.o g_mechname.o 	\
+			 g_oid_ops.o g_process_context.o g_rel_buffer.o g_rel_cred.o	\
+			 g_rel_name.o g_rel_oid_set.o g_seal.o g_sign.o g_unseal.o 	\
+			 g_verify.o gen_oids.o gssd_pname_to_uid.o oid_ops.o \
+			 g_dup_name.o
+
+
+
+SRCTOP = ./$(BUILDTOP)
+
+ALL_CFLAGS = $(DEFS) $(DEFINES) $(CPPFLAGS) $(LOCALINCLUDES) $(CFLAGS) 
+CFLAGS = -g
+# Add -DSPKM to the CPPFLAGS to turn on SPKM mechanism 
+CPPFLAGS = -DKRB5_KRB4_COMPAT -I$(BUILDTOP)/include -I$(SRCTOP)/include -I$(BUILDTOP)/include/krb5 -I$(SRCTOP)/include/krb5
+
+DEFS =  -DUMICH_REPLICATION=1 -DUMICH=1 -DKINIT_DEFAULT_BOTH=1 -DKRB5_DNS_LOOKUP_KDC=1 -DKRB5_DNS_LOOKUP=1 -DHAVE_STDLIB_H=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_LIMITS_H=1 -DSTDC_HEADERS=1 -DSIZEOF_SHORT=2 -DSIZEOF_INT=4 -DSIZEOF_LONG=4
+
+CC = gcc
+LD = $(PURE) gcc
+DEPLIBS = @DEPLIBS@
+LDFLAGS =
+LD_UNRESOLVED_PREFIX = @LD_UNRESOLVED_PREFIX@
+LD_SHLIBDIR_PREFIX = @LD_SHLIBDIR_PREFIX@
+LDARGS = @LDARGS@
+LIBS =  -lresolv
+
+all: libmechglue.a
+
+clean: 
+	rm $(OBJS)
+	rm libmechglue.a
+	rm OBJS.ST
+
+OBJS.ST: $(OBJS)
+
+libmechglue.a: $(OBJS) 
+	ar cqv libmechglue.a $(OBJS)
+	ranlib libmechglue.a
+	@echo $(OBJS) > OBJS.ST
+
+install:
--- clean/lib/gssapi/mechglue/g_dup_name.c	Tue Feb 26 12:42:08 2002
+++ dirty/lib/gssapi/mechglue/g_dup_name.c	Sun Mar  4 01:32:05 2001
@@ -0,0 +1,138 @@
+/*
+				 * Copyright 1996 by Sun Microsystems, Inc.
+ * 
+ * Permission to use, copy, modify, distribute, and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appears in all copies and
+ * that both that copyright notice and this permission notice appear in
+ * supporting documentation, and that the name of Sun Microsystems not be used
+ * in advertising or publicity pertaining to distribution of the software
+ * without specific, written prior permission. Sun Microsystems makes no
+ * representations about the suitability of this software for any
+ * purpose.  It is provided "as is" without express or implied warranty.
+ * 
+ * SUN MICROSYSTEMS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
+ * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
+ * EVENT SHALL SUN MICROSYSTEMS BE LIABLE FOR ANY SPECIAL, INDIRECT OR
+ * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF
+ * USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
+ * OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+ * PERFORMANCE OF THIS SOFTWARE.
+ *
+ * created andros 2.24.01 from g_compare_name.c
+ */
+
+/*
+ *  glue routine for gss_duplicate_name
+ *
+ */
+
+#include "mglueP.h"
+#ifdef HAVE_STDLIB_H
+#include <stdlib.h>
+#endif
+#include <string.h>
+#include <errno.h>
+
+#define g_OID_equal(o1,o2) \
+   (((o1)->length == (o2)->length) && \
+    (memcmp((o1)->elements,(o2)->elements,(int) (o1)->length) == 0))
+
+OM_uint32 KRB5_CALLCONV
+gss_duplicate_name (minor_status,
+                  in_name,
+                  exp_name)
+OM_uint32 *		minor_status;
+const gss_name_t		in_name;
+gss_name_t		*exp_name;
+{
+    OM_uint32		tmp,major_status =  GSS_S_COMPLETE;
+    gss_union_name_t	union_in_name, union_exp_name;
+    gss_mechanism	mech;
+    gss_name_t		internal_name;
+    
+    gss_initialize();
+
+    /* if exp_name is NULL, simply return */
+    if(exp_name == NULL)
+        return (GSS_S_COMPLETE);
+
+    *(char *)exp_name = 0;
+
+    if (in_name == 0)
+        return (GSS_S_BAD_NAME);
+
+    union_in_name = (gss_union_name_t) in_name;
+
+    /*
+     * Create the union name struct that will hold the exported
+     * name and the name type.
+     */
+
+    union_exp_name = (gss_union_name_t) malloc (sizeof(gss_union_name_desc));
+    if (!union_exp_name) {
+      *minor_status = ENOMEM;
+      return;
+    }
+    union_exp_name->mech_type = union_in_name->mech_type;
+    union_exp_name->mech_name = 0;
+    union_exp_name->name_type = union_in_name->name_type;
+    union_exp_name->external_name = 0;
+    union_exp_name->external_name =
+    (gss_buffer_t) malloc(sizeof(gss_buffer_desc));
+    if (!union_exp_name->external_name) {
+        *minor_status = ENOMEM;
+        goto allocation_failure;
+    }
+    union_exp_name->external_name->length = union_in_name->external_name->length; 
+    /* we malloc length+1 to stick a NULL on the end, just in case */
+    /* Note that this NULL is not included in ->length for a reason! */
+
+    union_exp_name->external_name->value =
+    (void  *) malloc(union_in_name->external_name->length);
+    if (!union_exp_name->external_name->value) {
+        *minor_status = ENOMEM;
+        goto allocation_failure;
+    }
+    memcpy(union_exp_name->external_name->value,
+        union_in_name->external_name->value,
+        union_exp_name->external_name->length);
+
+    /*
+     * Mechanism specific name
+     */
+
+    if (union_in_name->mech_type) {
+        mech = __gss_get_mechanism (union_in_name->mech_type);
+        if (!mech)
+            return (GSS_S_BAD_MECH);
+        if (!mech->gss_duplicate_name)
+            return (GSS_S_BAD_BINDINGS);
+
+        major_status = mech->gss_duplicate_name(mech->context, minor_status,
+            union_in_name->mech_name, &union_exp_name->mech_name);
+        if(major_status != GSS_S_COMPLETE)
+            return(major_status);
+    }
+		*exp_name = union_exp_name;
+		return(major_status);
+
+allocation_failure:
+    if (union_exp_name) {
+        if (union_exp_name->external_name) {
+            if (union_exp_name->external_name->value)
+                free(union_exp_name->external_name->value);
+                free(union_exp_name->external_name);
+        }
+        if (union_exp_name->name_type)
+            generic_gss_release_oid(&tmp, &union_exp_name->name_type);
+        if (union_exp_name->mech_name)
+            __gss_release_internal_name(minor_status, union_exp_name->mech_type,
+                &union_exp_name->mech_name);
+        if (union_exp_name->mech_type)
+            generic_gss_release_oid(&tmp, &union_exp_name->mech_type);
+            free(union_exp_name);
+    }
+return (major_status);
+
+}
--- clean/lib/gssapi/mechglue/mglueP.h	Wed Jan  9 17:27:44 2002
+++ dirty/lib/gssapi/mechglue/mglueP.h	Mon Feb 26 21:24:51 2001
@@ -341,7 +341,7 @@
 		    OM_uint32,		/* req_output_size */
 		    OM_uint32 *		/* max_input_size */
 	 ));
-    int		     (*pname_to_uid)
+    OM_uint32		     (*pname_to_uid)
 	NPROTOTYPE((
 		    void *,		/* context */
 		    char *,		/* pname */
@@ -349,6 +349,13 @@
 		    gss_OID,		/* mech type */
 		    uid_t *		/* uid */
 		    ));
+    OM_uint32		     (*gss_duplicate_name)
+  NPROTOTYPE((
+		    void *,		/* context */
+        OM_uint32  *,    /* minor_status */
+        const gss_name_t,  /* input_name */
+        gss_name_t *   /* dest_name */
+  ));
 
 } *gss_mechanism;
 
--- clean/lib/gssapi/Makefile.in	Wed Jan  9 17:27:42 2002
+++ dirty/lib/gssapi/Makefile.in	Mon Feb 19 08:45:35 2001
@@ -2,7 +2,7 @@
 myfulldir=lib/gssapi
 mydir=.
 BUILDTOP=$(REL)$(U)$(S)$(U)
-LOCAL_SUBDIRS= generic krb5
+LOCAL_SUBDIRS= generic krb5 mechglue
 
 ##DOSLIBNAME=$(OUTPRE)gssapi.lib
 ##DOSOBJFILELIST=@$(OUTPRE)generic.lst @$(OUTPRE)krb5.lst
@@ -12,7 +12,7 @@
 
 MAC_SUBDIRS = generic krb5
 
-LOCALINCLUDES = -Igeneric -I$(srcdir)/generic -Ikrb5 -I$(srcdir)/krb5
+LOCALINCLUDES = -Igeneric -I$(srcdir)/generic -Ikrb5 -I$(srcdir)/krb5 -Imechglue -I$(srcdir)/mechglue
 STLIBOBJS=\
 	gss_libinit.o
 
@@ -25,7 +25,7 @@
 LIB=gssapi_krb5
 LIBMAJOR=2
 LIBMINOR=2
-STOBJLISTS=OBJS.ST generic/OBJS.ST krb5/OBJS.ST
+STOBJLISTS=OBJS.ST generic/OBJS.ST krb5/OBJS.ST mechglue/OBJS.ST
 SHLIB_EXPDEPS=\
 	$(TOPLIBD)/libkrb5$(SHLIBEXT) \
 	$(TOPLIBD)/libk5crypto$(SHLIBEXT) \
--- clean/lib/gssapi/krb5/krb5mech.c	Tue Feb 26 12:42:08 2002
+++ dirty/lib/gssapi/krb5/krb5mech.c	Mon Feb 26 21:58:58 2001
@@ -0,0 +1,86 @@
+#include "../mechglue/mglueP.h"
+#include "gssapiP_krb5.h"
+#include "krb5mech.h"
+
+/*
+ * This is the declaration of the mechs_array table for Kerberos V5.
+ * If the gss_mechanism structure changes, so should this array!  I
+ * told you it was a private interface!
+ * NOTE: this was the origional mechanism -
+ *	{{5,"\053\005\001\005\002"},
+ */
+
+static struct gss_config krb5_mech_mechanism =
+	{{9, "\052\206\110\206\367\022\001\002\002"},
+	0,				/* context, to be filled */
+	krb5_mech_gss_acquire_cred,
+	krb5_mech_gss_release_cred,
+	krb5_mech_gss_init_sec_context,
+	krb5_mech_gss_accept_sec_context,
+	krb5_mech_gss_process_context_token,
+	krb5_mech_gss_delete_sec_context,
+	krb5_mech_gss_context_time,
+	krb5_mech_gss_sign,
+	krb5_mech_gss_verify,
+	krb5_mech_gss_seal,
+	krb5_mech_gss_unseal,
+	krb5_mech_gss_display_status,
+	krb5_mech_gss_indicate_mechs,
+	krb5_mech_gss_compare_name,
+	krb5_mech_gss_display_name,
+	krb5_mech_gss_import_name,
+	krb5_mech_gss_release_name,
+	krb5_mech_gss_inquire_cred,
+	krb5_mech_gss_add_cred,
+	krb5_mech_gss_export_sec_context,
+	krb5_mech_gss_import_sec_context,
+	krb5_mech_gss_inquire_cred_by_mech,
+	krb5_mech_gss_inquire_names_for_mech,
+	krb5_mech_gss_inquire_context,
+	krb5_mech_gss_internal_release_oid,
+	krb5_mech_gss_wrap_size_limit,     
+	krb5_mech_pname_to_uid,
+	krb5_mech_gss_duplicate_name,
+};
+
+
+#if 0
+OM_uint32
+krb5_mech_gss_get_context(void **	context)
+{
+    if (context == NULL)
+	return GSS_S_FAILURE;
+    if (kg_context) {
+	*context = kg_context;
+	return (GSS_S_COMPLETE);
+    }
+    if (krb5_mech_init_context(&kg_context))
+	return GSS_S_FAILURE;
+    if (krb5_mech_ser_context_init(kg_context) ||
+	krb5_mech_ser_auth_context_init(kg_context) ||
+	krb5_mech_ser_ccache_init(kg_context) ||
+	krb5_mech_ser_rcache_init(kg_context) ||
+	krb5_mech_ser_keytab_init(kg_context) ||
+	kg_ser_context_init(kg_context)) {
+	krb5_mech_free_context(kg_context);
+	kg_context = 0;
+	return (GSS_S_FAILURE);
+    }
+    *context = kg_context;
+    return GSS_S_COMPLETE;
+}
+
+gss_mechanism
+krb5_mech_gss_initialize()
+{
+
+    kg_get_context(&(krb5_mech_mechanism.context));
+    return (&krb5_mech_mechanism);
+}
+#endif /*0*/
+/* krb5 code doesn't use the gss_mechanism context */
+gss_mechanism
+krb5_gss_initialize()
+{
+    return (&krb5_mech_mechanism);
+}
--- clean/lib/gssapi/krb5/krb5mech.h	Tue Feb 26 12:42:08 2002
+++ dirty/lib/gssapi/krb5/krb5mech.h	Mon Feb 26 21:58:58 2001
@@ -0,0 +1,338 @@
+OM_uint32 krb5_mech_gss_accept_sec_context(
+     void  *context,
+     OM_uint32 FAR *minor_status,
+     gss_ctx_id_t FAR *context_handle,
+     gss_cred_id_t verifier_cred_handle,
+     gss_buffer_t input_token,
+     gss_channel_bindings_t input_chan_bindings,
+     gss_name_t FAR *src_name,
+     gss_OID FAR *mech_type,
+     gss_buffer_t output_token,
+     OM_uint32 FAR *ret_flags,
+     OM_uint32 FAR *time_rec,
+     gss_cred_id_t FAR *delegated_cred_handle
+);
+
+OM_uint32 krb5_mech_gss_acquire_cred(
+     void *context,
+     OM_uint32 FAR *minor_status,
+     gss_name_t desired_name,
+     OM_uint32 time_req,
+     gss_OID_set desired_mechs,
+     gss_cred_usage_t cred_usage,
+     gss_cred_id_t FAR *output_cred_handle,
+     gss_OID_set FAR *actual_mechs,
+     OM_uint32 FAR *time_rec
+);
+
+OM_uint32 krb5_mech_gss_add_cred(
+    void *context,
+    OM_uint32		FAR *minor_status,
+    gss_cred_id_t	input_cred_handle,
+    gss_name_t		desired_name,
+    gss_OID		desired_mech,
+    gss_cred_usage_t	cred_usage,
+    OM_uint32		initiator_time_req,
+    OM_uint32		acceptor_time_req,
+    gss_cred_id_t	FAR *output_cred_handle,
+    gss_OID_set		FAR *actual_mechs,
+    OM_uint32		FAR *initiator_time_rec,
+    OM_uint32		FAR *acceptor_time_rec
+);
+
+OM_uint32 krb5_mech_gss_compare_name(
+     void *context,
+     OM_uint32 FAR *minor_status,
+     gss_name_t name1,
+     gss_name_t name2,
+     int FAR *name_equal
+);
+
+OM_uint32 
+krb5_mech_gss_context_time(
+     void *context, 
+     OM_uint32 FAR *minor_status, 
+     gss_ctx_id_t context_handle,
+     OM_uint32 FAR *time_rec
+);
+
+
+OM_uint32 krb5_mech_gss_delete_sec_context (
+     void *context,
+     OM_uint32 FAR *minor_status,
+     gss_ctx_id_t FAR *context_handle,
+     gss_buffer_t output_token
+);
+
+OM_uint32 krb5_mech_gss_display_name (
+     void *context,
+     OM_uint32 FAR *minor_status,
+     gss_name_t input_name,
+     gss_buffer_t output_name_buffer,
+     gss_OID FAR *output_name_type
+);
+
+OM_uint32 krb5_mech_gss_display_status (
+     void *context,
+     OM_uint32 FAR *minor_status,
+     OM_uint32 status_value,
+     int status_type,
+     gss_OID mech_type,
+     OM_uint32 FAR *message_context,
+     gss_buffer_t status_string
+);
+
+OM_uint32 krb5_mech_gss_export_sec_context (
+     void *context,
+     OM_uint32		FAR *minor_status,
+     gss_ctx_id_t	FAR *context_handle,
+     gss_buffer_t	interprocess_token
+);
+
+OM_uint32 krb5_mech_gss_import_name (
+     void *context,
+     OM_uint32 FAR *minor_status,
+     gss_buffer_t input_name_buffer,
+     gss_OID input_name_type,
+     gss_name_t FAR *output_name
+);
+
+OM_uint32 krb5_mech_gss_import_sec_context(
+     void *context,
+     OM_uint32		FAR *minor_status,
+     gss_buffer_t	interprocess_token,
+     gss_ctx_id_t	FAR *context_handle
+);
+
+OM_uint32
+krb5_mech_gss_indicate_mechs(
+     void *context,
+     OM_uint32 FAR *minor_status,
+     gss_OID_set FAR *mech_set
+);
+
+OM_uint32
+krb5_mech_gss_init_sec_context(
+     void *context,
+     OM_uint32 FAR *minor_status,
+     gss_cred_id_t claimant_cred_handle,
+     gss_ctx_id_t FAR *context_handle,
+     gss_name_t target_name,
+     gss_OID mech_type,
+     OM_uint32 req_flags,
+     OM_uint32 time_req,
+     gss_channel_bindings_t input_chan_bindings,
+     gss_buffer_t input_token,
+     gss_OID FAR *actual_mech_type,
+     gss_buffer_t output_token,
+     OM_uint32 FAR *ret_flags,
+     OM_uint32 FAR *time_rec
+);
+
+OM_uint32
+krb5_mech_gss_inquire_context(
+     void *context,
+     OM_uint32 FAR *minor_status,
+     gss_ctx_id_t context_handle,
+     gss_name_t FAR *initiator_name,
+     gss_name_t FAR *acceptor_name,
+     OM_uint32 FAR *lifetime_rec,
+     gss_OID FAR *mech_type,
+     OM_uint32 FAR *ret_flags,
+     int FAR *locally_initiated,
+     int FAR *open
+);
+
+OM_uint32
+krb5_mech_gss_inquire_cred(
+     void *context,
+     OM_uint32 FAR *minor_status,
+     gss_cred_id_t cred_handle,
+     gss_name_t FAR *name,
+     OM_uint32 FAR *lifetime_ret,
+     gss_cred_usage_t FAR *cred_usage,
+     gss_OID_set FAR *mechanisms
+);
+
+OM_uint32
+krb5_mech_gss_inquire_cred_by_mech(
+     void *context,
+     OM_uint32		FAR *minor_status,
+     gss_cred_id_t	cred_handle,
+     gss_OID		mech_type,
+     gss_name_t		FAR *name,
+     OM_uint32		FAR *initiator_lifetime,
+     OM_uint32		FAR *acceptor_lifetime,
+     gss_cred_usage_t	FAR *cred_usage
+);
+
+OM_uint32
+krb5_mech_gss_inquire_names_for_mech(
+    void *context,
+    OM_uint32	FAR *minor_status,
+    gss_OID	mechanism,
+    gss_OID_set	FAR *name_types
+);
+
+OM_uint32
+krb5_mech_gss_oid_to_str(
+    OM_uint32		FAR *minor_status,
+    gss_OID		oid,
+    gss_buffer_t	oid_str
+);
+
+OM_uint32
+krb5_mech_gss_process_context_token(
+     void *context,
+     OM_uint32 FAR *minor_status,
+     gss_ctx_id_t context_handle,
+     gss_buffer_t token_buffer
+);
+
+OM_uint32
+krb5_mech_gss_release_name(
+     void *context,
+     OM_uint32 FAR *minor_status,
+     gss_name_t FAR *input_name
+);
+
+/* ANDROS added this function */
+OM_uint32
+krb5_mech_gss_internal_release_oid( void *context,
+     OM_uint32	FAR *minor_status,
+     gss_OID	FAR *oid
+);
+
+OM_uint32
+krb5_mech_gss_release_oid(
+     void *context,
+     OM_uint32	FAR *minor_status,
+     gss_OID	FAR *oid
+);
+
+OM_uint32 
+krb5_mech_gss_seal(
+     void *context,
+     OM_uint32 FAR *minor_status,
+     gss_ctx_id_t context_handle,
+     int conf_req_flag,
+     int qop_req,
+     gss_buffer_t input_message_buffer,
+     int FAR *conf_state,
+     gss_buffer_t output_message_buffer
+);
+
+OM_uint32
+krb5_mech_gss_sign(
+     void *context,
+     OM_uint32 FAR *minor_status,
+     gss_ctx_id_t context_handle,
+     int qop_req,
+     gss_buffer_t message_buffer,
+     gss_buffer_t message_token
+);
+
+OM_uint32
+krb5_mech_gss_verify_mic(
+     void *context,
+     OM_uint32		FAR *minor_status,
+     gss_ctx_id_t	context_handle,
+     gss_buffer_t	message_buffer,
+     gss_buffer_t	token_buffer,
+     gss_qop_t		FAR *qop_state
+);
+
+OM_uint32
+krb5_mech_gss_wrap(
+    void *context,
+    OM_uint32		FAR *minor_status,
+    gss_ctx_id_t	context_handle,
+    int			conf_req_flag,
+    gss_qop_t		qop_req,
+    gss_buffer_t	input_message_buffer,
+    int			FAR *conf_state,
+    gss_buffer_t	output_message_buffer
+);
+
+OM_uint32
+krb5_mech_gss_str_to_oid(
+    OM_uint32		FAR *minor_status,
+    gss_buffer_t	oid_str,
+    gss_OID		FAR *oid
+);
+
+OM_uint32
+krb5_mech_gss_test_oid_set_member(
+    OM_uint32	FAR *minor_status,
+    gss_OID	member,
+    gss_OID_set	set,
+    int		FAR *present
+);
+
+OM_uint32
+krb5_mech_gss_unseal(
+     void *context,
+     OM_uint32 FAR *minor_status,
+     gss_ctx_id_t context_handle,
+     gss_buffer_t input_message_buffer,
+     gss_buffer_t output_message_buffer,
+     int FAR *conf_state,
+     int FAR *qop_state
+);
+
+OM_uint32
+krb5_mech_gss_unwrap(
+    OM_uint32		FAR *minor_status,
+    gss_ctx_id_t	context_handle,
+    gss_buffer_t	input_message_buffer,
+    gss_buffer_t	output_message_buffer,
+    int			FAR *conf_state,
+    gss_qop_t		FAR *qop_state
+);
+
+OM_uint32
+krb5_mech_gss_verify(
+		 void *context,
+     OM_uint32 FAR *minor_status,
+     gss_ctx_id_t context_handle,
+     gss_buffer_t message_buffer,
+     gss_buffer_t token_buffer,
+     int FAR *qop_state
+);
+
+OM_uint32
+krb5_mech_gss_wrap_size_limit(
+    void *context,
+    OM_uint32		FAR *minor_status,
+    gss_ctx_id_t	context_handle,
+    int			conf_req_flag,
+    gss_qop_t		qop_req,
+    OM_uint32		req_output_size,
+    OM_uint32		FAR *max_input_size
+);
+
+OM_uint32
+krb5_mech_gss_release_cred(
+		 void *context,
+     OM_uint32 FAR *minor_status,
+     gss_cred_id_t FAR *cred_handle
+);
+
+OM_uint32
+krb5_mech_pname_to_uid(
+	    void *,           /* context */
+      char *,   /* principal name */
+      gss_OID,    /* name_type */
+      gss_OID,    /* mech_type */
+      uid_t *   /* uid (OUT) */
+);
+
+OM_uint32 
+krb5_mech_gss_duplicate_name(
+	void *,    /* context */
+  OM_uint32  *, /* minor_status */
+  const gss_name_t, /* input_name */
+  gss_name_t * /* dest_name */
+);
+
+
--- clean/lib/gssapi/krb5/krb5_gss_mechglue.c	Tue Feb 26 12:42:08 2002
+++ dirty/lib/gssapi/krb5/krb5_gss_mechglue.c	Mon Feb 26 21:27:46 2001
@@ -0,0 +1,545 @@
+/* ANDROS : derived from , and the 'real' krb5_gss_glue.c
+* routines to map from mechglue gss_mechanism prototypes to krb5_gss_XXX 
+* routines. 
+* NOTE: GSS_WRAP is not included in mechglue/mglueP.h
+*/
+
+#include "gssapiP_krb5.h"
+
+GSS_DLLIMP OM_uint32 KRB5_CALLCONV
+krb5_mech_gss_accept_sec_context(context,
+           minor_status, context_handle, verifier_cred_handle,
+		       input_token, input_chan_bindings, src_name, mech_type, 
+		       output_token, ret_flags, time_rec, delegated_cred_handle)
+     void  *context;
+     OM_uint32 FAR *minor_status;
+     gss_ctx_id_t FAR *context_handle;
+     gss_cred_id_t verifier_cred_handle;
+     gss_buffer_t input_token;
+     gss_channel_bindings_t input_chan_bindings;
+     gss_name_t FAR *src_name;
+     gss_OID FAR *mech_type;
+     gss_buffer_t output_token;
+     OM_uint32 FAR *ret_flags;
+     OM_uint32 FAR *time_rec;
+     gss_cred_id_t FAR *delegated_cred_handle;
+{
+   return(krb5_gss_accept_sec_context(minor_status,
+				      context_handle,
+				      verifier_cred_handle,
+				      input_token,
+				      input_chan_bindings,
+				      src_name,
+				      mech_type,
+				      output_token,
+				      ret_flags,
+				      time_rec,
+				      delegated_cred_handle));
+}
+
+GSS_DLLIMP OM_uint32 KRB5_CALLCONV
+krb5_mech_gss_acquire_cred(context,
+	        minor_status, desired_name, time_req, desired_mechs, cred_usage, 
+					output_cred_handle, actual_mechs, time_rec)
+     void *context;
+     OM_uint32 FAR *minor_status;
+     gss_name_t desired_name;
+     OM_uint32 time_req;
+     gss_OID_set desired_mechs;
+     gss_cred_usage_t cred_usage;
+     gss_cred_id_t FAR *output_cred_handle;
+     gss_OID_set FAR *actual_mechs;
+     OM_uint32 FAR *time_rec;
+{
+   return(krb5_gss_acquire_cred(minor_status,
+				desired_name,
+				time_req,
+				desired_mechs,
+				cred_usage,
+				output_cred_handle,
+				actual_mechs,
+				time_rec));
+}
+
+/* V2 */
+GSS_DLLIMP OM_uint32 KRB5_CALLCONV
+krb5_mech_gss_add_cred(context,
+	     minor_status, input_cred_handle, desired_name, desired_mech,
+	     cred_usage, initiator_time_req, acceptor_time_req,
+	     output_cred_handle, actual_mechs, initiator_time_rec,
+	     acceptor_time_rec)
+    void *context;
+    OM_uint32		FAR *minor_status;
+    gss_cred_id_t	input_cred_handle;
+    gss_name_t		desired_name;
+    gss_OID		desired_mech;
+    gss_cred_usage_t	cred_usage;
+    OM_uint32		initiator_time_req;
+    OM_uint32		acceptor_time_req;
+    gss_cred_id_t	FAR *output_cred_handle;
+    gss_OID_set		FAR *actual_mechs;
+    OM_uint32		FAR *initiator_time_rec;
+    OM_uint32		FAR *acceptor_time_rec;
+{
+    return(krb5_gss_add_cred(minor_status, input_cred_handle, desired_name,
+			     desired_mech, cred_usage, initiator_time_req,
+			     acceptor_time_req, output_cred_handle,
+			     actual_mechs, initiator_time_rec,
+			     acceptor_time_rec));
+}
+
+GSS_DLLIMP OM_uint32 KRB5_CALLCONV
+krb5_mech_gss_compare_name(context,minor_status, name1, name2, name_equal)
+     void *context;
+     OM_uint32 FAR *minor_status;
+     gss_name_t name1;
+     gss_name_t name2;
+     int FAR *name_equal;
+{
+   return(krb5_gss_compare_name(minor_status, name1,
+				name2, name_equal));
+}
+
+GSS_DLLIMP OM_uint32 KRB5_CALLCONV
+krb5_mech_gss_context_time(context,minor_status, context_handle, time_rec)
+     void *context; 
+     OM_uint32 FAR *minor_status; 
+     gss_ctx_id_t context_handle;
+     OM_uint32 FAR *time_rec;
+{
+   return(krb5_gss_context_time(minor_status, context_handle,
+				time_rec));
+}
+
+
+GSS_DLLIMP OM_uint32 KRB5_CALLCONV
+krb5_mech_gss_delete_sec_context(context,
+	        minor_status, context_handle, output_token)
+     void *context;
+     OM_uint32 FAR *minor_status;
+     gss_ctx_id_t FAR *context_handle;
+     gss_buffer_t output_token;
+{
+   return(krb5_gss_delete_sec_context(minor_status,
+				      context_handle, output_token));
+}
+
+GSS_DLLIMP OM_uint32 KRB5_CALLCONV
+krb5_mech_gss_display_name(context,
+	        minor_status, input_name, output_name_buffer, output_name_type)
+     void *context;
+     OM_uint32 FAR *minor_status;
+     gss_name_t input_name;
+     gss_buffer_t output_name_buffer;
+     gss_OID FAR *output_name_type;
+{
+   return(krb5_gss_display_name(minor_status, input_name,
+				output_name_buffer, output_name_type));
+}
+
+GSS_DLLIMP OM_uint32 KRB5_CALLCONV
+krb5_mech_gss_display_status(context,minor_status, status_value, status_type,
+		   mech_type, message_context, status_string)
+     void *context;
+     OM_uint32 FAR *minor_status;
+     OM_uint32 status_value;
+     int status_type;
+     gss_OID mech_type;
+     OM_uint32 FAR *message_context;
+     gss_buffer_t status_string;
+{
+   return(krb5_gss_display_status(minor_status, status_value,
+				  status_type, mech_type, message_context,
+				  status_string));
+}
+
+/* V2 */
+GSS_DLLIMP OM_uint32 KRB5_CALLCONV
+krb5_mech_gss_export_sec_context(context,
+	      minor_status, context_handle, interprocess_token)
+     void *context;
+     OM_uint32		FAR *minor_status;
+     gss_ctx_id_t	FAR *context_handle;
+     gss_buffer_t	interprocess_token;
+{
+   return(krb5_gss_export_sec_context(minor_status,
+				      context_handle,
+				      interprocess_token));
+}
+
+
+GSS_DLLIMP OM_uint32 KRB5_CALLCONV
+krb5_mech_gss_import_name(context,
+	        minor_status, input_name_buffer, input_name_type, output_name)
+     void *context;
+     OM_uint32 FAR *minor_status;
+     gss_buffer_t input_name_buffer;
+     gss_OID input_name_type;
+     gss_name_t FAR *output_name;
+{
+   return(krb5_gss_import_name(minor_status, input_name_buffer,
+			       input_name_type, output_name));
+}
+
+/* V2 */
+GSS_DLLIMP OM_uint32 KRB5_CALLCONV
+krb5_mech_gss_import_sec_context(context,
+	      minor_status, interprocess_token, context_handle)
+     void *context;
+     OM_uint32		FAR *minor_status;
+     gss_buffer_t	interprocess_token;
+     gss_ctx_id_t	FAR *context_handle;
+{
+   return(krb5_gss_import_sec_context(minor_status,
+				      interprocess_token,
+				      context_handle));
+}
+
+GSS_DLLIMP OM_uint32 KRB5_CALLCONV
+krb5_mech_gss_indicate_mechs(context,minor_status, mech_set)
+     void *context;
+     OM_uint32 FAR *minor_status;
+     gss_OID_set FAR *mech_set;
+{
+   return(krb5_gss_indicate_mechs(minor_status, mech_set));
+}
+
+GSS_DLLIMP OM_uint32 KRB5_CALLCONV
+krb5_mech_gss_init_sec_context(context,
+				 minor_status, claimant_cred_handle, context_handle,
+		     target_name, mech_type, req_flags, time_req,
+		     input_chan_bindings, input_token, actual_mech_type,
+		     output_token, ret_flags, time_rec)
+     void *context;
+     OM_uint32 FAR *minor_status;
+     gss_cred_id_t claimant_cred_handle;
+     gss_ctx_id_t FAR *context_handle;
+     gss_name_t target_name;
+     gss_OID mech_type;
+     OM_uint32 req_flags;
+     OM_uint32 time_req;
+     gss_channel_bindings_t input_chan_bindings;
+     gss_buffer_t input_token;
+     gss_OID FAR *actual_mech_type;
+     gss_buffer_t output_token;
+     OM_uint32 FAR *ret_flags;
+     OM_uint32 FAR *time_rec;
+{
+   return(krb5_gss_init_sec_context(minor_status,
+				    claimant_cred_handle, context_handle,
+				    target_name, mech_type, req_flags,
+				    time_req, input_chan_bindings, input_token,
+				    actual_mech_type, output_token, ret_flags,
+				    time_rec));
+}
+
+GSS_DLLIMP OM_uint32 KRB5_CALLCONV
+krb5_mech_gss_inquire_context(context,
+	      minor_status, context_handle, initiator_name, acceptor_name,
+		    lifetime_rec, mech_type, ret_flags,
+		    locally_initiated, open)
+     void *context;
+     OM_uint32 FAR *minor_status;
+     gss_ctx_id_t context_handle;
+     gss_name_t FAR *initiator_name;
+     gss_name_t FAR *acceptor_name;
+     OM_uint32 FAR *lifetime_rec;
+     gss_OID FAR *mech_type;
+     OM_uint32 FAR *ret_flags;
+     int FAR *locally_initiated;
+     int FAR *open;
+{
+   return(krb5_gss_inquire_context(minor_status, context_handle,
+				   initiator_name, acceptor_name, lifetime_rec,
+				   mech_type, ret_flags, locally_initiated,
+				   open));
+}
+
+GSS_DLLIMP OM_uint32 KRB5_CALLCONV
+krb5_mech_gss_inquire_cred(context,
+	      minor_status, cred_handle, name, lifetime_ret,
+		    cred_usage, mechanisms)
+     void *context;
+     OM_uint32 FAR *minor_status;
+     gss_cred_id_t cred_handle;
+     gss_name_t FAR *name;
+     OM_uint32 FAR *lifetime_ret;
+     gss_cred_usage_t FAR *cred_usage;
+     gss_OID_set FAR *mechanisms;
+{
+   return(krb5_gss_inquire_cred(minor_status, cred_handle,
+				name, lifetime_ret, cred_usage, mechanisms));
+}
+
+/* V2 */
+GSS_DLLIMP OM_uint32 KRB5_CALLCONV
+krb5_mech_gss_inquire_cred_by_mech(context,
+	      minor_status, cred_handle, mech_type, name,
+			  initiator_lifetime, acceptor_lifetime, cred_usage)
+     void *context;
+     OM_uint32		FAR *minor_status;
+     gss_cred_id_t	cred_handle;
+     gss_OID		mech_type;
+     gss_name_t		FAR *name;
+     OM_uint32		FAR *initiator_lifetime;
+     OM_uint32		FAR *acceptor_lifetime;
+     gss_cred_usage_t	FAR *cred_usage;
+{
+   return(krb5_gss_inquire_cred_by_mech(minor_status, cred_handle,
+					mech_type, name, initiator_lifetime,
+					acceptor_lifetime, cred_usage));
+}
+
+/* V2 */
+GSS_DLLIMP OM_uint32 KRB5_CALLCONV
+krb5_mech_gss_inquire_names_for_mech(context,minor_status, mechanism, name_types)
+    void *context;
+    OM_uint32	FAR *minor_status;
+    gss_OID	mechanism;
+    gss_OID_set	FAR *name_types;
+{
+    return(krb5_gss_inquire_names_for_mech(minor_status,
+					   mechanism,
+					   name_types));
+}
+
+/* V2 */
+GSS_DLLIMP OM_uint32 KRB5_CALLCONV
+krb5_mech_gss_oid_to_str(minor_status, oid, oid_str)
+    OM_uint32		FAR *minor_status;
+    gss_OID		oid;
+    gss_buffer_t	oid_str;
+{
+    return(generic_gss_oid_to_str(minor_status, oid, oid_str));
+}
+
+GSS_DLLIMP OM_uint32 KRB5_CALLCONV
+krb5_mech_gss_process_context_token(context,
+	        minor_status, context_handle, token_buffer)
+     void *context;
+     OM_uint32 FAR *minor_status;
+     gss_ctx_id_t context_handle;
+     gss_buffer_t token_buffer;
+{
+   return(krb5_gss_process_context_token(minor_status,
+					 context_handle, token_buffer));
+}
+
+GSS_DLLIMP OM_uint32 KRB5_CALLCONV
+krb5_mech_gss_release_cred(context,minor_status, cred_handle)
+     void *context;
+     OM_uint32 FAR *minor_status;
+     gss_cred_id_t FAR *cred_handle;
+{
+   return(krb5_gss_release_cred(minor_status, cred_handle));
+}
+
+GSS_DLLIMP OM_uint32 KRB5_CALLCONV
+krb5_mech_gss_release_name(context,minor_status, input_name)
+     void *context;
+     OM_uint32 FAR *minor_status;
+     gss_name_t FAR *input_name;
+{
+   return(krb5_gss_release_name(minor_status, input_name));
+}
+
+
+/* ANDROS added this function */
+GSS_DLLIMP OM_uint32 KRB5_CALLCONV
+krb5_mech_gss_internal_release_oid(context,minor_status, oid)
+     void *context;
+     OM_uint32	FAR *minor_status;
+     gss_OID	FAR *oid;
+{
+    return(krb5_gss_release_oid(minor_status, oid));
+}
+
+/* V2 */
+GSS_DLLIMP OM_uint32 KRB5_CALLCONV
+krb5_mech_gss_release_oid(context,minor_status, oid)
+     void *context;
+     OM_uint32	FAR *minor_status;
+     gss_OID	FAR *oid;
+{
+    return(krb5_gss_release_oid(minor_status, oid));
+}
+
+/* V1 only */
+GSS_DLLIMP OM_uint32 KRB5_CALLCONV
+krb5_mech_gss_seal(context,minor_status, context_handle, conf_req_flag, qop_req,
+	 input_message_buffer, conf_state, output_message_buffer)
+     void *context;
+     OM_uint32 FAR *minor_status;
+     gss_ctx_id_t context_handle;
+     int conf_req_flag;
+     int qop_req;
+     gss_buffer_t input_message_buffer;
+     int FAR *conf_state;
+     gss_buffer_t output_message_buffer;
+{
+   return(krb5_gss_seal(minor_status, context_handle,
+			conf_req_flag, qop_req, input_message_buffer,
+			conf_state, output_message_buffer));
+}
+
+GSS_DLLIMP OM_uint32 KRB5_CALLCONV
+krb5_mech_gss_sign(context,minor_status, context_handle,
+	      qop_req, message_buffer, 
+	      message_token)
+     void *context;
+     OM_uint32 FAR *minor_status;
+     gss_ctx_id_t context_handle;
+     int qop_req;
+     gss_buffer_t message_buffer;
+     gss_buffer_t message_token;
+{
+   return(krb5_gss_sign(minor_status, context_handle,
+			qop_req, message_buffer, message_token));
+}
+
+/* V2 */
+GSS_DLLIMP OM_uint32 KRB5_CALLCONV
+krb5_mech_gss_verify_mic(context,minor_status, context_handle,
+	       message_buffer, token_buffer, qop_state)
+     void *context;
+     OM_uint32		FAR *minor_status;
+     gss_ctx_id_t	context_handle;
+     gss_buffer_t	message_buffer;
+     gss_buffer_t	token_buffer;
+     gss_qop_t		FAR *qop_state;
+{
+    return(krb5_gss_verify_mic(minor_status, context_handle,
+			       message_buffer, token_buffer, qop_state));
+}
+
+/* V2 */
+GSS_DLLIMP OM_uint32 KRB5_CALLCONV
+krb5_mech_gss_wrap(context,
+	      minor_status, context_handle, conf_req_flag, qop_req,
+	      input_message_buffer, conf_state, output_message_buffer)
+    void *context;
+    OM_uint32		FAR *minor_status;
+    gss_ctx_id_t	context_handle;
+    int			conf_req_flag;
+    gss_qop_t		qop_req;
+    gss_buffer_t	input_message_buffer;
+    int			FAR *conf_state;
+    gss_buffer_t	output_message_buffer;
+{
+    return(krb5_gss_wrap(minor_status, context_handle, conf_req_flag, qop_req,
+			 input_message_buffer, conf_state,
+			 output_message_buffer));
+}
+
+/* V2 */
+GSS_DLLIMP OM_uint32 KRB5_CALLCONV
+krb5_mech_gss_str_to_oid(minor_status, oid_str, oid)
+    OM_uint32		FAR *minor_status;
+    gss_buffer_t	oid_str;
+    gss_OID		FAR *oid;
+{
+    return(generic_gss_str_to_oid(minor_status, oid_str, oid));
+}
+
+/* V2 */
+GSS_DLLIMP OM_uint32 KRB5_CALLCONV
+krb5_mech_gss_test_oid_set_member(minor_status, member, set, present)
+    OM_uint32	FAR *minor_status;
+    gss_OID	member;
+    gss_OID_set	set;
+    int		FAR *present;
+{
+    return(generic_gss_test_oid_set_member(minor_status, member, set,
+					   present));
+}
+
+/* V1 only */
+GSS_DLLIMP OM_uint32 KRB5_CALLCONV
+krb5_mech_gss_unseal(context,minor_status, context_handle, input_message_buffer,
+	   output_message_buffer, conf_state, qop_state)
+     void *context;
+     OM_uint32 FAR *minor_status;
+     gss_ctx_id_t context_handle;
+     gss_buffer_t input_message_buffer;
+     gss_buffer_t output_message_buffer;
+     int FAR *conf_state;
+     int FAR *qop_state;
+{
+   return(krb5_gss_unseal(minor_status, context_handle,
+			  input_message_buffer, output_message_buffer,
+			  conf_state, qop_state));
+}
+
+/* V2 */
+GSS_DLLIMP OM_uint32 KRB5_CALLCONV
+krb5_mech_gss_unwrap(context,minor_status, context_handle, 
+	   input_message_buffer, output_message_buffer, conf_state, qop_state)
+    void *context;
+    OM_uint32		FAR *minor_status;
+    gss_ctx_id_t	context_handle;
+    gss_buffer_t	input_message_buffer;
+    gss_buffer_t	output_message_buffer;
+    int			FAR *conf_state;
+    gss_qop_t		FAR *qop_state;
+{
+    return(krb5_gss_unwrap(minor_status, context_handle, input_message_buffer,
+			   output_message_buffer, conf_state, qop_state));
+}
+
+/* V1 only */
+GSS_DLLIMP OM_uint32 KRB5_CALLCONV
+krb5_mech_gss_verify(context,minor_status, context_handle, message_buffer,
+	   token_buffer, qop_state)
+	   void *context;
+     OM_uint32 FAR *minor_status;
+     gss_ctx_id_t context_handle;
+     gss_buffer_t message_buffer;
+     gss_buffer_t token_buffer;
+     int FAR *qop_state;
+{
+   return(krb5_gss_verify(minor_status,
+			  context_handle,
+			  message_buffer,
+			  token_buffer,
+			  qop_state));
+}
+
+/* V2 interface */
+GSS_DLLIMP OM_uint32 KRB5_CALLCONV
+krb5_mech_gss_wrap_size_limit(context,
+	      minor_status, context_handle, conf_req_flag,
+		    qop_req, req_output_size, max_input_size)
+    void *context;
+    OM_uint32		FAR *minor_status;
+    gss_ctx_id_t	context_handle;
+    int			conf_req_flag;
+    gss_qop_t		qop_req;
+    OM_uint32		req_output_size;
+    OM_uint32		FAR *max_input_size;
+{
+   return(krb5_gss_wrap_size_limit(minor_status, context_handle,
+				   conf_req_flag, qop_req,
+				   req_output_size, max_input_size));
+}
+
+GSS_DLLIMP OM_uint32 KRB5_CALLCONV
+krb5_mech_pname_to_uid(context,pname,name_oid,mech_oid,uid)
+      void * context;           /* context */
+      char *pname;   /* principal name */ 
+      gss_OID name_oid;    /* name_type */
+      gss_OID mech_oid;    /* mech_type */
+      uid_t *uid;  /* uid (OUT) */
+{
+   return(krb5_pname_to_uid(context, pname, name_oid, mech_oid, uid));
+}
+
+GSS_DLLIMP OM_uint32 KRB5_CALLCONV
+krb5_mech_gss_duplicate_name(context,minor_status, input_name, dest_name)
+  void * context;           /* context */
+  OM_uint32  *minor_status;
+  const gss_name_t input_name;
+  gss_name_t *dest_name;
+{
+  return krb5_gss_duplicate_name(minor_status, input_name, dest_name);
+}
+
--- clean/lib/gssapi/krb5/Makefile.in	Wed Jan  9 17:27:43 2002
+++ dirty/lib/gssapi/krb5/Makefile.in	Mon Feb 19 09:38:20 2001
@@ -44,7 +44,9 @@
 	$(srcdir)/inq_names.c \
 	$(srcdir)/k5seal.c \
 	$(srcdir)/k5unseal.c \
-	$(srcdir)/krb5_gss_glue.c \
+	$(srcdir)/krb5_gss_mechglue.c \
+	$(srcdir)/krb5mech.c \
+	$(srcdir)/pname_to_uid.c \
 	$(srcdir)/process_context_token.c \
 	$(srcdir)/rel_cred.c \
 	$(srcdir)/rel_oid.c \
@@ -92,7 +94,9 @@
 	$(OUTPRE)inq_names.$(OBJEXT) \
 	$(OUTPRE)k5seal.$(OBJEXT) \
 	$(OUTPRE)k5unseal.$(OBJEXT) \
-	$(OUTPRE)krb5_gss_glue.$(OBJEXT) \
+	$(OUTPRE)krb5_gss_mechglue.$(OBJEXT) \
+	$(OUTPRE)krb5mech.$(OBJEXT) \
+	$(OUTPRE)pname_to_uid.$(OBJEXT) \
 	$(OUTPRE)process_context_token.$(OBJEXT) \
 	$(OUTPRE)rel_cred.$(OBJEXT) \
 	$(OUTPRE)rel_oid.$(OBJEXT) \
@@ -140,7 +144,9 @@
 	inq_names.o \
 	k5seal.o \
 	k5unseal.o \
-	krb5_gss_glue.o \
+	krb5_gss_mechglue.o \
+	krb5mech.o \
+	pname_to_uid.o \
 	process_context_token.o \
 	rel_cred.o \
 	rel_oid.o \
