[31542] in CVS-changelog-for-Kerberos-V5

home help back first fref pref prev next nref lref last post

krb5 commit: Remove g_mechname.c

daemon@ATHENA.MIT.EDU (ghudson@mit.edu)
Thu May 28 02:18:54 2026

From: ghudson@mit.edu
To: cvs-krb5@mit.edu
Message-Id: <20260528061849.AF9EB101BCB@krbdev.mit.edu>
Date: Thu, 28 May 2026 02:18:49 -0400 (EDT)
MIME-Version: 1.0
Reply-To: krbdev@mit.edu
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Errors-To: cvs-krb5-bounces@mit.edu

https://github.com/krb5/krb5/commit/6823391247f2e089cb7e1571d2098646f1c5b8c5
commit 6823391247f2e089cb7e1571d2098646f1c5b8c5
Author: Greg Hudson <ghudson@mit.edu>
Date:   Sat May 23 17:35:40 2026 -0400

    Remove g_mechname.c
    
    Commit ac36696ff85d0516a8dbab887162f4a3e51531c6 intended to remove the
    unused g_mechname.c, but did not remove the actual file or the
    gss_mech_spec_name declaration.  Remove them now.

 src/lib/gssapi/mechglue/g_mechname.c | 114 -----------------------------------
 src/lib/gssapi/mechglue/mglueP.h     |   9 ---
 2 files changed, 123 deletions(-)

diff --git a/src/lib/gssapi/mechglue/g_mechname.c b/src/lib/gssapi/mechglue/g_mechname.c
deleted file mode 100644
index 5664fa157..000000000
--- a/src/lib/gssapi/mechglue/g_mechname.c
+++ /dev/null
@@ -1,114 +0,0 @@
-/*
- * g_mechname.c --- registry of mechanism-specific name types
- *
- * This file contains a registry of mechanism-specific name types.  It
- * is used to determine which name types not should be lazy evaluated,
- * but rather evaluated on the spot.
- */
-
-#include "mglueP.h"
-#ifdef HAVE_STDLIB_H
-#include <stdlib.h>
-#endif
-
-#include <stdio.h>
-#include <string.h>
-#include <errno.h>
-
-static gss_mech_spec_name name_list = NULL;
-
-/*
- * generic searching helper function.
- */
-static gss_mech_spec_name
-search_mech_spec(gss_OID name_type)
-{
-    gss_mech_spec_name p;
-
-    for (p = name_list; p; p = p->next) {
-	if (g_OID_equal(name_type, p->name_type))
-	    return p;
-    }
-    return NULL;
-}
-
-/*
- * Given a name_type, if it is specific to a mechanism, return the
- * mechanism OID.  Otherwise, return NULL.
- */
-gss_OID
-gss_find_mechanism_from_name_type(gss_OID name_type)
-{
-    gss_mech_spec_name p;
-
-    p = search_mech_spec(name_type);
-    if (!p)
-	return NULL;
-    return p->mech;
-}
-
-/*
- * This function adds a (name_type, mechanism) pair to the
- * mechanism-specific name type registry.  If an entry for the
- * name_type already exists, then zero out the mechanism entry.
- * Otherwise, enter the pair into the registry.
- */
-OM_uint32
-gss_add_mech_name_type(OM_uint32 *minor_status, gss_OID name_type,
-		       gss_OID mech)
-{
-    OM_uint32	major_status, tmp;
-    gss_mech_spec_name p;
-
-    p = search_mech_spec(name_type);
-    if (p) {
-	/*
-	 * We found an entry for this name type; mark it as not being
-	 * a mechanism-specific name type.
-	 */
-	if (p->mech) {
-	    if (!g_OID_equal(mech, p->mech)) {
-		generic_gss_release_oid(minor_status, &p->mech);
-		p->mech = 0;
-	    }
-	}
-	return GSS_S_COMPLETE;
-    }
-    p = malloc(sizeof(gss_mech_spec_name_desc));
-    if (!p) {
-	*minor_status = ENOMEM;
-	map_errcode(minor_status);
-	goto allocation_failure;
-    }
-    p->name_type = 0;
-    p->mech = 0;
-
-    major_status = generic_gss_copy_oid(minor_status, name_type,
-					&p->name_type);
-    if (major_status) {
-	map_errcode(minor_status);
-	goto allocation_failure;
-    }
-    major_status = generic_gss_copy_oid(minor_status, mech,
-					&p->mech);
-    if (major_status) {
-	map_errcode(minor_status);
-	goto allocation_failure;
-    }
-
-    p->next = name_list;
-    p->prev = 0;
-    name_list = p;
-
-    return GSS_S_COMPLETE;
-
-allocation_failure:
-    if (p) {
-	if (p->mech)
-	    generic_gss_release_oid(&tmp, &p->mech);
-	if (p->name_type)
-	    generic_gss_release_oid(&tmp, &p->name_type);
-	free(p);
-    }
-    return GSS_S_FAILURE;
-}
diff --git a/src/lib/gssapi/mechglue/mglueP.h b/src/lib/gssapi/mechglue/mglueP.h
index cece19362..16c3ad770 100644
--- a/src/lib/gssapi/mechglue/mglueP.h
+++ b/src/lib/gssapi/mechglue/mglueP.h
@@ -45,15 +45,6 @@ typedef struct gss_name_struct {
 	gss_name_t		mech_name;
 } gss_union_name_desc, *gss_union_name_t;
 
-/*
- * Structure for holding list of mechanism-specific name types
- */
-typedef struct gss_mech_spec_name_t {
-    gss_OID	name_type;
-    gss_OID	mech;
-    struct gss_mech_spec_name_t	*next, *prev;
-} gss_mech_spec_name_desc, *gss_mech_spec_name;
-
 /*
  * Set of Credentials typed on mechanism OID
  */
_______________________________________________
cvs-krb5 mailing list
cvs-krb5@mit.edu
https://mailman.mit.edu/mailman/listinfo/cvs-krb5

home help back first fref pref prev next nref lref last post