diff options
Diffstat (limited to 'source4/auth/gensec/spnego.c')
-rw-r--r-- | source4/auth/gensec/spnego.c | 56 |
1 files changed, 28 insertions, 28 deletions
diff --git a/source4/auth/gensec/spnego.c b/source4/auth/gensec/spnego.c index 88521b912c..5c1c15935f 100644 --- a/source4/auth/gensec/spnego.c +++ b/source4/auth/gensec/spnego.c @@ -41,7 +41,7 @@ struct spnego_state { enum spnego_message_type expected_packet; enum spnego_state_position state_position; struct gensec_security *sub_sec_security; - BOOL no_response_expected; + bool no_response_expected; const char *neg_oid; }; @@ -59,7 +59,7 @@ static NTSTATUS gensec_spnego_client_start(struct gensec_security *gensec_securi spnego_state->expected_packet = SPNEGO_NEG_TOKEN_INIT; spnego_state->state_position = SPNEGO_CLIENT_START; spnego_state->sub_sec_security = NULL; - spnego_state->no_response_expected = False; + spnego_state->no_response_expected = false; gensec_security->private_data = spnego_state; return NT_STATUS_OK; @@ -77,7 +77,7 @@ static NTSTATUS gensec_spnego_server_start(struct gensec_security *gensec_securi spnego_state->expected_packet = SPNEGO_NEG_TOKEN_INIT; spnego_state->state_position = SPNEGO_SERVER_START; spnego_state->sub_sec_security = NULL; - spnego_state->no_response_expected = False; + spnego_state->no_response_expected = false; gensec_security->private_data = spnego_state; return NT_STATUS_OK; @@ -92,7 +92,7 @@ static NTSTATUS gensec_spnego_unseal_packet(struct gensec_security *gensec_secur const uint8_t *whole_pdu, size_t pdu_length, const DATA_BLOB *sig) { - struct spnego_state *spnego_state = gensec_security->private_data; + struct spnego_state *spnego_state = (struct spnego_state *)gensec_security->private_data; if (spnego_state->state_position != SPNEGO_DONE && spnego_state->state_position != SPNEGO_FALLBACK) { @@ -112,7 +112,7 @@ static NTSTATUS gensec_spnego_check_packet(struct gensec_security *gensec_securi const uint8_t *whole_pdu, size_t pdu_length, const DATA_BLOB *sig) { - struct spnego_state *spnego_state = gensec_security->private_data; + struct spnego_state *spnego_state = (struct spnego_state *)gensec_security->private_data; if (spnego_state->state_position != SPNEGO_DONE && spnego_state->state_position != SPNEGO_FALLBACK) { @@ -132,7 +132,7 @@ static NTSTATUS gensec_spnego_seal_packet(struct gensec_security *gensec_securit const uint8_t *whole_pdu, size_t pdu_length, DATA_BLOB *sig) { - struct spnego_state *spnego_state = gensec_security->private_data; + struct spnego_state *spnego_state = (struct spnego_state *)gensec_security->private_data; if (spnego_state->state_position != SPNEGO_DONE && spnego_state->state_position != SPNEGO_FALLBACK) { @@ -152,7 +152,7 @@ static NTSTATUS gensec_spnego_sign_packet(struct gensec_security *gensec_securit const uint8_t *whole_pdu, size_t pdu_length, DATA_BLOB *sig) { - struct spnego_state *spnego_state = gensec_security->private_data; + struct spnego_state *spnego_state = (struct spnego_state *)gensec_security->private_data; if (spnego_state->state_position != SPNEGO_DONE && spnego_state->state_position != SPNEGO_FALLBACK) { @@ -171,7 +171,7 @@ static NTSTATUS gensec_spnego_wrap(struct gensec_security *gensec_security, const DATA_BLOB *in, DATA_BLOB *out) { - struct spnego_state *spnego_state = gensec_security->private_data; + struct spnego_state *spnego_state = (struct spnego_state *)gensec_security->private_data; if (spnego_state->state_position != SPNEGO_DONE && spnego_state->state_position != SPNEGO_FALLBACK) { @@ -188,7 +188,7 @@ static NTSTATUS gensec_spnego_unwrap(struct gensec_security *gensec_security, const DATA_BLOB *in, DATA_BLOB *out) { - struct spnego_state *spnego_state = gensec_security->private_data; + struct spnego_state *spnego_state = (struct spnego_state *)gensec_security->private_data; if (spnego_state->state_position != SPNEGO_DONE && spnego_state->state_position != SPNEGO_FALLBACK) { @@ -206,7 +206,7 @@ static NTSTATUS gensec_spnego_wrap_packets(struct gensec_security *gensec_securi DATA_BLOB *out, size_t *len_processed) { - struct spnego_state *spnego_state = gensec_security->private_data; + struct spnego_state *spnego_state = (struct spnego_state *)gensec_security->private_data; if (spnego_state->state_position != SPNEGO_DONE && spnego_state->state_position != SPNEGO_FALLBACK) { @@ -222,7 +222,7 @@ static NTSTATUS gensec_spnego_wrap_packets(struct gensec_security *gensec_securi static NTSTATUS gensec_spnego_packet_full_request(struct gensec_security *gensec_security, DATA_BLOB blob, size_t *size) { - struct spnego_state *spnego_state = gensec_security->private_data; + struct spnego_state *spnego_state = (struct spnego_state *)gensec_security->private_data; if (spnego_state->state_position != SPNEGO_DONE && spnego_state->state_position != SPNEGO_FALLBACK) { @@ -240,7 +240,7 @@ static NTSTATUS gensec_spnego_unwrap_packets(struct gensec_security *gensec_secu DATA_BLOB *out, size_t *len_processed) { - struct spnego_state *spnego_state = gensec_security->private_data; + struct spnego_state *spnego_state = (struct spnego_state *)gensec_security->private_data; if (spnego_state->state_position != SPNEGO_DONE && spnego_state->state_position != SPNEGO_FALLBACK) { @@ -255,7 +255,7 @@ static NTSTATUS gensec_spnego_unwrap_packets(struct gensec_security *gensec_secu static size_t gensec_spnego_sig_size(struct gensec_security *gensec_security, size_t data_size) { - struct spnego_state *spnego_state = gensec_security->private_data; + struct spnego_state *spnego_state = (struct spnego_state *)gensec_security->private_data; if (spnego_state->state_position != SPNEGO_DONE && spnego_state->state_position != SPNEGO_FALLBACK) { @@ -267,7 +267,7 @@ static size_t gensec_spnego_sig_size(struct gensec_security *gensec_security, si static size_t gensec_spnego_max_input_size(struct gensec_security *gensec_security) { - struct spnego_state *spnego_state = gensec_security->private_data; + struct spnego_state *spnego_state = (struct spnego_state *)gensec_security->private_data; if (spnego_state->state_position != SPNEGO_DONE && spnego_state->state_position != SPNEGO_FALLBACK) { @@ -279,7 +279,7 @@ static size_t gensec_spnego_max_input_size(struct gensec_security *gensec_securi static size_t gensec_spnego_max_wrapped_size(struct gensec_security *gensec_security) { - struct spnego_state *spnego_state = gensec_security->private_data; + struct spnego_state *spnego_state = (struct spnego_state *)gensec_security->private_data; if (spnego_state->state_position != SPNEGO_DONE && spnego_state->state_position != SPNEGO_FALLBACK) { @@ -292,7 +292,7 @@ static size_t gensec_spnego_max_wrapped_size(struct gensec_security *gensec_secu static NTSTATUS gensec_spnego_session_key(struct gensec_security *gensec_security, DATA_BLOB *session_key) { - struct spnego_state *spnego_state = gensec_security->private_data; + struct spnego_state *spnego_state = (struct spnego_state *)gensec_security->private_data; if (!spnego_state->sub_sec_security) { return NT_STATUS_INVALID_PARAMETER; } @@ -304,7 +304,7 @@ static NTSTATUS gensec_spnego_session_key(struct gensec_security *gensec_securit static NTSTATUS gensec_spnego_session_info(struct gensec_security *gensec_security, struct auth_session_info **session_info) { - struct spnego_state *spnego_state = gensec_security->private_data; + struct spnego_state *spnego_state = (struct spnego_state *)gensec_security->private_data; if (!spnego_state->sub_sec_security) { return NT_STATUS_INVALID_PARAMETER; } @@ -329,16 +329,16 @@ static NTSTATUS gensec_spnego_server_try_fallback(struct gensec_security *gensec struct gensec_security_ops **all_ops = gensec_security_mechs(gensec_security, out_mem_ctx); for (i=0; all_ops[i]; i++) { - BOOL is_spnego; + bool is_spnego; NTSTATUS nt_status; if (!all_ops[i]->oid) { continue; } - is_spnego = False; + is_spnego = false; for (j=0; all_ops[i]->oid[j]; j++) { if (strcasecmp(GENSEC_OID_SPNEGO,all_ops[i]->oid[j]) == 0) { - is_spnego = True; + is_spnego = true; } } if (is_spnego) { @@ -622,7 +622,7 @@ static NTSTATUS gensec_spnego_create_negTokenInit(struct gensec_security *gensec spnego_state->neg_oid = all_sec[i].oid; if (NT_STATUS_IS_OK(nt_status)) { - spnego_state->no_response_expected = True; + spnego_state->no_response_expected = true; } return NT_STATUS_MORE_PROCESSING_REQUIRED; @@ -685,7 +685,7 @@ static NTSTATUS gensec_spnego_server_negTokenTarg(struct gensec_security *gensec static NTSTATUS gensec_spnego_update(struct gensec_security *gensec_security, TALLOC_CTX *out_mem_ctx, const DATA_BLOB in, DATA_BLOB *out) { - struct spnego_state *spnego_state = gensec_security->private_data; + struct spnego_state *spnego_state = (struct spnego_state *)gensec_security->private_data; DATA_BLOB null_data_blob = data_blob(NULL, 0); DATA_BLOB unwrapped_out = data_blob(NULL, 0); struct spnego_data spnego_out; @@ -820,7 +820,7 @@ static NTSTATUS gensec_spnego_update(struct gensec_security *gensec_security, TA spnego_state->state_position = SPNEGO_CLIENT_TARG; if (NT_STATUS_IS_OK(nt_status)) { - spnego_state->no_response_expected = True; + spnego_state->no_response_expected = true; } spnego_free_data(&spnego); @@ -947,7 +947,7 @@ static NTSTATUS gensec_spnego_update(struct gensec_security *gensec_security, TA &unwrapped_out); if (NT_STATUS_IS_OK(nt_status)) { - spnego_state->no_response_expected = True; + spnego_state->no_response_expected = true; } } @@ -999,12 +999,12 @@ static NTSTATUS gensec_spnego_update(struct gensec_security *gensec_security, TA return NT_STATUS_INVALID_PARAMETER; } -static BOOL gensec_spnego_have_feature(struct gensec_security *gensec_security, +static bool gensec_spnego_have_feature(struct gensec_security *gensec_security, uint32_t feature) { - struct spnego_state *spnego_state = gensec_security->private_data; + struct spnego_state *spnego_state = (struct spnego_state *)gensec_security->private_data; if (!spnego_state->sub_sec_security) { - return False; + return false; } return gensec_have_feature(spnego_state->sub_sec_security, @@ -1039,7 +1039,7 @@ static const struct gensec_security_ops gensec_spnego_security_ops = { .session_key = gensec_spnego_session_key, .session_info = gensec_spnego_session_info, .have_feature = gensec_spnego_have_feature, - .enabled = True, + .enabled = true, .priority = GENSEC_SPNEGO }; |