Skip to content

Commit

Permalink
Remove unused GSS code
Browse files Browse the repository at this point in the history
Commit b003144 removed the only
consumers of util_set.c.  Also remove declarations for g_strdup() and
g_local_host_name(), which were not used as far back as krb5-1.0.
  • Loading branch information
greghudson committed Jul 2, 2024
1 parent e688903 commit 93be431
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 139 deletions.
3 changes: 0 additions & 3 deletions src/lib/gssapi/generic/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ SRCS = \
$(srcdir)/util_buffer.c \
$(srcdir)/util_buffer_set.c \
$(srcdir)/util_errmap.c \
$(srcdir)/util_set.c \
$(srcdir)/util_seqstate.c \
$(srcdir)/util_token.c \
gssapi_err_generic.c
Expand All @@ -83,7 +82,6 @@ OBJS = \
$(OUTPRE)util_buffer.$(OBJEXT) \
$(OUTPRE)util_buffer_set.$(OBJEXT) \
$(OUTPRE)util_errmap.$(OBJEXT) \
$(OUTPRE)util_set.$(OBJEXT) \
$(OUTPRE)util_seqstate.$(OBJEXT) \
$(OUTPRE)util_token.$(OBJEXT) \
$(OUTPRE)gssapi_err_generic.$(OBJEXT)
Expand All @@ -98,7 +96,6 @@ STLIBOBJS = \
util_buffer.o \
util_buffer_set.o \
util_errmap.o \
util_set.o \
util_seqstate.o \
util_token.o \
gssapi_err_generic.o
Expand Down
37 changes: 0 additions & 37 deletions src/lib/gssapi/generic/gssapiP_generic.h
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,6 @@
/** helper functions **/

/* hide names from applications, especially glib applications */
#define g_set_init gssint_g_set_init
#define g_set_destroy gssint_g_set_destroy
#define g_set_entry_add gssint_g_set_entry_add
#define g_set_entry_delete gssint_g_set_entry_delete
#define g_set_entry_get gssint_g_set_entry_get
#define g_make_string_buffer gssint_g_make_string_buffer
#define g_token_size gssint_g_token_size
#define g_make_token_header gssint_g_make_token_header
Expand All @@ -84,39 +79,9 @@
#define g_seqstate_externalize gssint_g_seqstate_externalize
#define g_seqstate_internalize gssint_g_seqstate_internalize
#define g_canonicalize_host gssint_g_canonicalize_host
#define g_local_host_name gssint_g_local_host_name
#define g_strdup gssint_g_strdup

typedef struct _g_set_elt *g_set_elt;
typedef struct {
k5_mutex_t mutex;
void *data;
} g_set;
#define G_SET_INIT { K5_MUTEX_PARTIAL_INITIALIZER, 0 }

typedef struct g_seqnum_state_st *g_seqnum_state;

int g_set_init (g_set_elt *s);
int g_set_destroy (g_set_elt *s);
int g_set_entry_add (g_set_elt *s, void *key, void *value);
int g_set_entry_delete (g_set_elt *s, void *key);
int g_set_entry_get (g_set_elt *s, void *key, void **value);

int g_save_name (g_set *vdb, gss_name_t name);
int g_save_cred_id (g_set *vdb, gss_cred_id_t cred);
int g_save_ctx_id (g_set *vdb, gss_ctx_id_t ctx);
int g_save_lucidctx_id (g_set *vdb, void *lctx);

int g_validate_name (g_set *vdb, gss_name_t name);
int g_validate_cred_id (g_set *vdb, gss_cred_id_t cred);
int g_validate_ctx_id (g_set *vdb, gss_ctx_id_t ctx);
int g_validate_lucidctx_id (g_set *vdb, void *lctx);

int g_delete_name (g_set *vdb, gss_name_t name);
int g_delete_cred_id (g_set *vdb, gss_cred_id_t cred);
int g_delete_ctx_id (g_set *vdb, gss_ctx_id_t ctx);
int g_delete_lucidctx_id (g_set *vdb, void *lctx);

int g_make_string_buffer (const char *str, gss_buffer_t buffer);

unsigned int g_token_size (const gss_OID_desc * mech, unsigned int body_size);
Expand Down Expand Up @@ -152,8 +117,6 @@ long g_seqstate_externalize(g_seqnum_state state, unsigned char **buf,
long g_seqstate_internalize(g_seqnum_state *state_out, unsigned char **buf,
size_t *lenremain);

char *g_strdup (char *str);

/** declarations of internal name mechanism functions **/

OM_uint32
Expand Down
91 changes: 0 additions & 91 deletions src/lib/gssapi/generic/util_set.c

This file was deleted.

2 changes: 0 additions & 2 deletions src/lib/gssapi/krb5/gssapiP_krb5.h
Original file line number Diff line number Diff line change
Expand Up @@ -247,8 +247,6 @@ typedef struct _krb5_gss_ctx_id_rec {
krb5_authdata **authdata;
} krb5_gss_ctx_id_rec, *krb5_gss_ctx_id_t;

extern g_set kg_vdb;

#ifndef LEAN_CLIENT
extern k5_mutex_t gssint_krb5_keytab_lock;
#endif /* LEAN_CLIENT */
Expand Down
6 changes: 0 additions & 6 deletions src/lib/gssapi/krb5/gssapi_krb5.c
Original file line number Diff line number Diff line change
Expand Up @@ -188,8 +188,6 @@ const gss_OID_set gss_mech_set_krb5_old = &kg_oidsets[1];
const gss_OID_set gss_mech_set_krb5_both = &kg_oidsets[2];
const gss_OID_set kg_all_mechs = &kg_oidsets[3];

g_set kg_vdb = G_SET_INIT;

/** default credential support */

/*
Expand Down Expand Up @@ -1073,9 +1071,6 @@ int gss_krb5int_lib_init(void)
err = k5_mutex_finish_init(&kg_kdc_flag_mutex);
if (err)
return err;
err = k5_mutex_finish_init(&kg_vdb.mutex);
if (err)
return err;
#endif
#ifdef _GSS_STATIC_LINK
err = gss_krb5mechglue_init();
Expand Down Expand Up @@ -1107,7 +1102,6 @@ void gss_krb5int_lib_fini(void)
k5_key_delete(K5_KEY_GSS_KRB5_SET_CCACHE_OLD_NAME);
k5_key_delete(K5_KEY_GSS_KRB5_CCACHE_NAME);
k5_key_delete(K5_KEY_GSS_KRB5_ERROR_MESSAGE);
k5_mutex_destroy(&kg_vdb.mutex);
#ifndef _WIN32
k5_mutex_destroy(&kg_kdc_flag_mutex);
#endif
Expand Down

0 comments on commit 93be431

Please sign in to comment.