From e59e82b90204107a3b6e2e6e3fc52d48634adc7a Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Tue, 6 Jul 2004 23:20:23 +0000 Subject: r1372: Remove the 'default' case from the SPENGO state machine, and fix up some compiler warnings that allowed us to see. Andrew Bartlett (This used to be commit 1a6c2018dd49519e6fccdd5a7f35d70b67d45275) --- source4/libcli/auth/spnego.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'source4/libcli') diff --git a/source4/libcli/auth/spnego.c b/source4/libcli/auth/spnego.c index b680fe170e..502d30b30f 100644 --- a/source4/libcli/auth/spnego.c +++ b/source4/libcli/auth/spnego.c @@ -40,7 +40,7 @@ struct spnego_state { TALLOC_CTX *mem_ctx; uint_t ref_count; enum spnego_message_type expected_packet; - enum spnego_message_type state_position; + enum spnego_state_position state_position; enum spnego_negResult result; struct gensec_security *sub_sec_security; }; @@ -314,8 +314,9 @@ static NTSTATUS gensec_spnego_update(struct gensec_security *gensec_security, TA } else { /* server needs to send NegTargetInit */ } + return NT_STATUS_INVALID_PARAMETER; } - + case SPNEGO_CLIENT_START: { /* The server offers a list of mechanisms */ @@ -534,11 +535,10 @@ static NTSTATUS gensec_spnego_update(struct gensec_security *gensec_security, TA return nt_status; } - default: - spnego_free_data(&spnego); - DEBUG(1, ("Invalid SPENGO request: %d\n", spnego.type)); - return NT_STATUS_INVALID_PARAMETER; + case SPNEGO_DONE: + return NT_STATUS_OK; } + return NT_STATUS_INVALID_PARAMETER; } static void gensec_spnego_end(struct gensec_security *gensec_security) -- cgit