From: Sam Hartman Date: Mon, 12 Jan 2009 21:03:02 +0000 (+0000) Subject: Remove gss_export_name_object and gss_import_name_object. X-Git-Tag: krb5-1.7-alpha1~82 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=38b2d99d51532b001c2385e03397ded168f68592;p=krb5.git Remove gss_export_name_object and gss_import_name_object. These are not standard interfaces, are not used by our tree and were added because they might be useful but ended up not being used. The stubs in gssapi.hin remain as they were shipped with previous releases. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21728 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/lib/gssapi/krb5/gssapi_krb5.c b/src/lib/gssapi/krb5/gssapi_krb5.c index 16ab581a9..a3e53072c 100644 --- a/src/lib/gssapi/krb5/gssapi_krb5.c +++ b/src/lib/gssapi/krb5/gssapi_krb5.c @@ -661,8 +661,6 @@ static struct gss_config krb5_mechanism = { krb5_gss_wrap_size_limit, krb5_gss_export_name, NULL, /* store_cred */ - NULL, /* import_name_object */ - NULL, /* export_name_object */ krb5_gss_inquire_sec_context_by_oid, krb5_gss_inquire_cred_by_oid, krb5_gss_set_sec_context_option, diff --git a/src/lib/gssapi/libgssapi_krb5.exports b/src/lib/gssapi/libgssapi_krb5.exports index 524533843..69f390e45 100644 --- a/src/lib/gssapi/libgssapi_krb5.exports +++ b/src/lib/gssapi/libgssapi_krb5.exports @@ -23,11 +23,9 @@ gss_display_name gss_display_status gss_duplicate_name gss_export_name -gss_export_name_object gss_export_sec_context gss_get_mic gss_import_name -gss_import_name_object gss_import_sec_context gss_indicate_mechs gss_init_sec_context diff --git a/src/lib/gssapi/mechglue/Makefile.in b/src/lib/gssapi/mechglue/Makefile.in index 13a750b23..927b3755c 100644 --- a/src/lib/gssapi/mechglue/Makefile.in +++ b/src/lib/gssapi/mechglue/Makefile.in @@ -25,10 +25,8 @@ SRCS = \ $(srcdir)/g_dup_name.c \ $(srcdir)/g_exp_sec_context.c \ $(srcdir)/g_export_name.c \ - $(srcdir)/g_export_name_object.c \ $(srcdir)/g_glue.c \ $(srcdir)/g_imp_name.c \ - $(srcdir)/g_imp_name_object.c \ $(srcdir)/g_imp_sec_context.c \ $(srcdir)/g_init_sec_context.c \ $(srcdir)/g_initialize.c \ @@ -71,10 +69,8 @@ OBJS = \ $(OUTPRE)g_dup_name.$(OBJEXT) \ $(OUTPRE)g_exp_sec_context.$(OBJEXT) \ $(OUTPRE)g_export_name.$(OBJEXT) \ - $(OUTPRE)g_export_name_object.$(OBJEXT) \ $(OUTPRE)g_glue.$(OBJEXT) \ $(OUTPRE)g_imp_name.$(OBJEXT) \ - $(OUTPRE)g_imp_name_object.$(OBJEXT) \ $(OUTPRE)g_imp_sec_context.$(OBJEXT) \ $(OUTPRE)g_init_sec_context.$(OBJEXT) \ $(OUTPRE)g_initialize.$(OBJEXT) \ @@ -117,10 +113,8 @@ STLIBOBJS = \ g_dup_name.o \ g_exp_sec_context.o \ g_export_name.o \ - g_export_name_object.o \ g_glue.o \ g_imp_name.o \ - g_imp_name_object.o \ g_imp_sec_context.o \ g_init_sec_context.o \ g_initialize.o \ diff --git a/src/lib/gssapi/mechglue/deps b/src/lib/gssapi/mechglue/deps index f67f754d0..c54fae9f2 100644 --- a/src/lib/gssapi/mechglue/deps +++ b/src/lib/gssapi/mechglue/deps @@ -105,14 +105,6 @@ g_export_name.so g_export_name.po $(OUTPRE)g_export_name.$(OBJEXT): \ $(srcdir)/../generic/gssapi_ext.h $(srcdir)/../generic/gssapi_generic.h \ ../generic/gssapi_err_generic.h g_export_name.c mechglue.h \ mglueP.h -g_export_name_object.so g_export_name_object.po $(OUTPRE)g_export_name_object.$(OBJEXT): \ - $(BUILDTOP)/include/autoconf.h $(BUILDTOP)/include/gssapi/gssapi.h \ - $(BUILDTOP)/include/gssapi/gssapi_ext.h $(COM_ERR_DEPS) \ - $(SRCTOP)/include/k5-buf.h $(SRCTOP)/include/k5-platform.h \ - $(SRCTOP)/include/k5-thread.h $(srcdir)/../generic/gssapiP_generic.h \ - $(srcdir)/../generic/gssapi_ext.h $(srcdir)/../generic/gssapi_generic.h \ - ../generic/gssapi_err_generic.h g_export_name_object.c \ - mechglue.h mglueP.h g_glue.so g_glue.po $(OUTPRE)g_glue.$(OBJEXT): $(BUILDTOP)/include/autoconf.h \ $(BUILDTOP)/include/gssapi/gssapi.h $(BUILDTOP)/include/gssapi/gssapi_ext.h \ $(COM_ERR_DEPS) $(SRCTOP)/include/k5-buf.h $(SRCTOP)/include/k5-platform.h \ @@ -128,14 +120,6 @@ g_imp_name.so g_imp_name.po $(OUTPRE)g_imp_name.$(OBJEXT): \ $(srcdir)/../generic/gssapi_ext.h $(srcdir)/../generic/gssapi_generic.h \ ../generic/gssapi_err_generic.h g_imp_name.c mechglue.h \ mglueP.h -g_imp_name_object.so g_imp_name_object.po $(OUTPRE)g_imp_name_object.$(OBJEXT): \ - $(BUILDTOP)/include/autoconf.h $(BUILDTOP)/include/gssapi/gssapi.h \ - $(BUILDTOP)/include/gssapi/gssapi_ext.h $(COM_ERR_DEPS) \ - $(SRCTOP)/include/k5-buf.h $(SRCTOP)/include/k5-platform.h \ - $(SRCTOP)/include/k5-thread.h $(srcdir)/../generic/gssapiP_generic.h \ - $(srcdir)/../generic/gssapi_ext.h $(srcdir)/../generic/gssapi_generic.h \ - ../generic/gssapi_err_generic.h g_imp_name_object.c \ - mechglue.h mglueP.h g_imp_sec_context.so g_imp_sec_context.po $(OUTPRE)g_imp_sec_context.$(OBJEXT): \ $(BUILDTOP)/include/autoconf.h $(BUILDTOP)/include/gssapi/gssapi.h \ $(BUILDTOP)/include/gssapi/gssapi_ext.h $(COM_ERR_DEPS) \ diff --git a/src/lib/gssapi/mechglue/g_export_name_object.c b/src/lib/gssapi/mechglue/g_export_name_object.c deleted file mode 100644 index 400507043..000000000 --- a/src/lib/gssapi/mechglue/g_export_name_object.c +++ /dev/null @@ -1,74 +0,0 @@ -/* - * Copyright (c) 1996,1997, by Sun Microsystems, Inc. - * All rights reserved. - */ - -/* #pragma ident "@(#)g_export_name.c 1.11 00/07/17 SMI" */ - -/* - * glue routine gss_export_name_object_object_object_object - * - * Will either call the mechanism defined gss_export_name, or if one is - * not defined will call a generic_gss_export_name routine. - */ - -#include -#ifdef HAVE_STDLIB_H -#include -#endif -#include -#include - -OM_uint32 KRB5_CALLCONV -gss_export_name_object(minor_status, - input_name, - desired_name_type, - output_name) -OM_uint32 * minor_status; -const gss_name_t input_name; -gss_OID desired_name_type; -void ** output_name; -{ - gss_union_name_t union_name; - gss_mechanism mech; - OM_uint32 major_status; - - if (minor_status != NULL) - *minor_status = 0; - - if (output_name != NULL) - *output_name = NULL; - - if (minor_status == NULL) - return GSS_S_CALL_INACCESSIBLE_WRITE; - - if (input_name == NULL) - return GSS_S_CALL_INACCESSIBLE_READ | GSS_S_BAD_NAME; - - if (desired_name_type == GSS_C_NO_OID) - return GSS_S_CALL_INACCESSIBLE_READ | GSS_S_BAD_NAMETYPE; - - if (output_name == NULL) - return GSS_S_CALL_INACCESSIBLE_WRITE; - - union_name = (gss_union_name_t)input_name; - - if (union_name->mech_type == GSS_C_NO_OID) - return GSS_S_NAME_NOT_MN; - - mech = gssint_get_mechanism(union_name->mech_type); - if (mech == NULL) - return GSS_S_BAD_MECH; - - if (mech->gss_export_name_object == NULL) - return GSS_S_UNAVAILABLE; - - major_status = mech->gss_export_name_object(minor_status, - input_name, - desired_name_type, - output_name); - if (major_status != GSS_S_COMPLETE) - map_error(minor_status, mech); - - return major_status; -} diff --git a/src/lib/gssapi/mechglue/g_imp_name_object.c b/src/lib/gssapi/mechglue/g_imp_name_object.c deleted file mode 100644 index 83f327bd7..000000000 --- a/src/lib/gssapi/mechglue/g_imp_name_object.c +++ /dev/null @@ -1,124 +0,0 @@ -/* #pragma ident "@(#)g_imp_name.c 1.26 04/02/23 SMI" */ - -/* - * 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. - */ - -/* - * glue routine gss_import_name_object - * - */ - -#include "mglueP.h" -#include -#ifdef HAVE_STDLIB_H -#include -#endif -#include -#include - -static OM_uint32 -val_imp_name_object_args( - OM_uint32 *minor_status, - void *input_name, - gss_OID input_name_type, - gss_name_t *output_name) -{ - if (minor_status == NULL) - return GSS_S_CALL_INACCESSIBLE_WRITE; - - *minor_status = 0; - - if (output_name == NULL) - return GSS_S_CALL_INACCESSIBLE_WRITE; - - if (input_name_type == GSS_C_NO_OID) - return GSS_S_CALL_INACCESSIBLE_READ | GSS_S_BAD_NAMETYPE; - - if (input_name == NULL) - return GSS_S_CALL_INACCESSIBLE_READ | GSS_S_BAD_NAME; - - return GSS_S_COMPLETE; -} - -OM_uint32 KRB5_CALLCONV -gss_import_name_object(minor_status, - input_name, - input_name_type, - output_name) -OM_uint32 * minor_status; -void * input_name; -gss_OID input_name_type; -gss_name_t * output_name; -{ - gss_union_name_t union_name = NULL; - gss_mechanism mech = NULL; - gss_name_t internal_name = GSS_C_NO_NAME; - OM_uint32 tmp, major_status = GSS_S_FAILURE; - gss_OID_set mechlist = GSS_C_NO_OID_SET; - size_t i; - - major_status = val_imp_name_object_args(minor_status, - input_name, - input_name_type, - output_name); - if (major_status != GSS_S_COMPLETE) - return major_status; - - major_status = gss_indicate_mechs(minor_status, &mechlist); - if (major_status != GSS_S_COMPLETE) - return major_status; - - major_status = GSS_S_BAD_NAMETYPE; - - for (i = 0; i < mechlist->count; i++) { - mech = gssint_get_mechanism(&mechlist->elements[i]); - if (mech == NULL || mech->gss_import_name_object == NULL) - continue; - - major_status = mech->gss_import_name_object(minor_status, - input_name, - input_name_type, - &internal_name); - if (major_status != GSS_S_BAD_NAMETYPE) - break; - } - - if (major_status == GSS_S_COMPLETE) { - assert(internal_name != GSS_C_NO_NAME); - - major_status = gssint_convert_name_to_union_name(minor_status, - mech, - internal_name, - &union_name); - if (major_status != GSS_S_COMPLETE) { - if (mech->gss_release_name != NULL) - mech->gss_release_name(&tmp, &internal_name); - } else - *output_name = (gss_name_t)union_name; - } else - map_error(minor_status, mech); - - generic_gss_release_oid_set(&tmp, &mechlist); - - return major_status; -} - diff --git a/src/lib/gssapi/mechglue/g_initialize.c b/src/lib/gssapi/mechglue/g_initialize.c index e762341c5..a6f0bbc8d 100644 --- a/src/lib/gssapi/mechglue/g_initialize.c +++ b/src/lib/gssapi/mechglue/g_initialize.c @@ -750,8 +750,6 @@ build_dynamicMech(void *dl, const gss_OID mech_type) GSS_ADD_DYNAMIC_METHOD(dl, mech, gss_wrap_size_limit); GSS_ADD_DYNAMIC_METHOD(dl, mech, gss_export_name); GSS_ADD_DYNAMIC_METHOD(dl, mech, gss_store_cred); - GSS_ADD_DYNAMIC_METHOD(dl, mech, gss_import_name_object); - GSS_ADD_DYNAMIC_METHOD(dl, mech, gss_export_name_object); GSS_ADD_DYNAMIC_METHOD(dl, mech, gss_inquire_sec_context_by_oid); GSS_ADD_DYNAMIC_METHOD(dl, mech, gss_inquire_cred_by_oid); GSS_ADD_DYNAMIC_METHOD(dl, mech, gss_set_sec_context_option); diff --git a/src/lib/gssapi/mechglue/mglueP.h b/src/lib/gssapi/mechglue/mglueP.h index 52195f293..001636146 100644 --- a/src/lib/gssapi/mechglue/mglueP.h +++ b/src/lib/gssapi/mechglue/mglueP.h @@ -370,21 +370,6 @@ typedef struct gss_config { gss_cred_usage_t * /* cred_usage_stored */ /* */); - OM_uint32 (*gss_import_name_object) - ( - OM_uint32 *, /* minor_status */ - void *, /* input_name */ - gss_OID, /* input_name_type */ - gss_name_t * /* output_name */ - /* */); - - OM_uint32 (*gss_export_name_object) - ( - OM_uint32 *, /* minor_status */ - gss_name_t, /* input_name */ - gss_OID, /* desired_name_type */ - void ** /* output_name */ - /* */); /* GGF extensions */ diff --git a/src/lib/gssapi/spnego/spnego_mech.c b/src/lib/gssapi/spnego/spnego_mech.c index 44aea2643..5321de0be 100644 --- a/src/lib/gssapi/spnego/spnego_mech.c +++ b/src/lib/gssapi/spnego/spnego_mech.c @@ -247,8 +247,6 @@ static struct gss_config spnego_mechanism = spnego_gss_wrap_size_limit, /* gss_wrap_size_limit */ NULL, /* gss_export_name */ NULL, /* gss_store_cred */ - NULL, /* gss_import_name_object */ - NULL, /* gss_export_name_object */ spnego_gss_inquire_sec_context_by_oid, /* gss_inquire_sec_context_by_oid */ NULL, /* gss_inquire_cred_by_oid */ spnego_gss_set_sec_context_option, /* gss_set_sec_context_option */