Skip to content

Commit

Permalink
Remove unused SPNEGO context fields
Browse files Browse the repository at this point in the history
The optionStr and default_cred fields of spnego_gss_ctx_id_rec are
unused; remove them.

[ghudson@mit.edu: squashed commits, rewrote commit message]
  • Loading branch information
nicowilliams authored and greghudson committed Dec 10, 2015
1 parent 08fafff commit 360237d
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 18 deletions.
2 changes: 0 additions & 2 deletions src/lib/gssapi/spnego/gssapiP_spnego.h
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,6 @@ typedef struct {
gss_OID_set mech_set;
gss_OID internal_mech; /* alias into mech_set->elements */
gss_ctx_id_t ctx_handle;
char *optionStr;
gss_cred_id_t default_cred;
int mic_reqd;
int mic_sent;
int mic_rcvd;
Expand Down
16 changes: 0 additions & 16 deletions src/lib/gssapi/spnego/spnego_mech.c
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,6 @@ static OM_uint32 get_available_mechs(OM_uint32 *, gss_name_t, gss_cred_usage_t,
static OM_uint32 get_negotiable_mechs(OM_uint32 *, spnego_gss_cred_id_t,
gss_cred_usage_t, gss_OID_set *);
static void release_spnego_ctx(spnego_gss_ctx_id_t *);
static void check_spnego_options(spnego_gss_ctx_id_t);
static spnego_gss_ctx_id_t create_spnego_ctx(int);
static int put_mech_set(gss_OID_set mechSet, gss_buffer_t buf);
static int put_input_token(unsigned char **, gss_buffer_t, unsigned int);
Expand Down Expand Up @@ -446,13 +445,6 @@ spnego_gss_release_cred(OM_uint32 *minor_status,
return (GSS_S_COMPLETE);
}

static void
check_spnego_options(spnego_gss_ctx_id_t spnego_ctx)
{
spnego_ctx->optionStr = gssint_get_modOptions(
(const gss_OID)&spnego_oids[0]);
}

static spnego_gss_ctx_id_t
create_spnego_ctx(int initiate)
{
Expand All @@ -468,10 +460,8 @@ create_spnego_ctx(int initiate)
spnego_ctx->ctx_handle = GSS_C_NO_CONTEXT;
spnego_ctx->mech_set = NULL;
spnego_ctx->internal_mech = NULL;
spnego_ctx->optionStr = NULL;
spnego_ctx->DER_mechTypes.length = 0;
spnego_ctx->DER_mechTypes.value = NULL;
spnego_ctx->default_cred = GSS_C_NO_CREDENTIAL;
spnego_ctx->mic_reqd = 0;
spnego_ctx->mic_sent = 0;
spnego_ctx->mic_rcvd = 0;
Expand All @@ -482,8 +472,6 @@ create_spnego_ctx(int initiate)
spnego_ctx->internal_name = GSS_C_NO_NAME;
spnego_ctx->actual_mech = GSS_C_NO_OID;

check_spnego_options(spnego_ctx);

return (spnego_ctx);
}

Expand Down Expand Up @@ -3052,10 +3040,6 @@ release_spnego_ctx(spnego_gss_ctx_id_t *ctx)

(void) gss_release_name(&minor_stat, &context->internal_name);

if (context->optionStr != NULL) {
free(context->optionStr);
context->optionStr = NULL;
}
free(context);
*ctx = NULL;
}
Expand Down

0 comments on commit 360237d

Please sign in to comment.