1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-25 23:21:54 +03:00

r1229: the name of the protocol should be in first place of a function name

rename <read|write|free>_spnego_data() into
spnego_<read|write|free>_data

metze
This commit is contained in:
Stefan Metzmacher 2004-06-23 15:32:44 +00:00 committed by Gerald (Jerry) Carter
parent 626bb153c4
commit 3f57c8f596
2 changed files with 10 additions and 10 deletions

View File

@ -152,7 +152,7 @@ NTSTATUS gensec_spnego_update(struct gensec_security *gensec_security, TALLOC_CT
out_mem_ctx, in, out); out_mem_ctx, in, out);
} }
len = read_spnego_data(in, &spnego); len = spnego_read_data(in, &spnego);
if (len == -1 && spnego_state->state_position == SPNEGO_SERVER_START) { if (len == -1 && spnego_state->state_position == SPNEGO_SERVER_START) {
int i; int i;
@ -180,7 +180,7 @@ NTSTATUS gensec_spnego_update(struct gensec_security *gensec_security, TALLOC_CT
} else { } else {
if (spnego.type != spnego_state->expected_packet) { if (spnego.type != spnego_state->expected_packet) {
free_spnego_data(&spnego); spnego_free_data(&spnego);
DEBUG(1, ("Invalid SPENGO request: %d, expected %d\n", spnego.type, DEBUG(1, ("Invalid SPENGO request: %d, expected %d\n", spnego.type,
spnego_state->expected_packet)); spnego_state->expected_packet));
return NT_STATUS_INVALID_PARAMETER; return NT_STATUS_INVALID_PARAMETER;
@ -231,7 +231,7 @@ NTSTATUS gensec_spnego_update(struct gensec_security *gensec_security, TALLOC_CT
DEBUG(1, ("SPENGO: Could not find a suitable mechtype in NEG_TOKEN_INIT\n")); DEBUG(1, ("SPENGO: Could not find a suitable mechtype in NEG_TOKEN_INIT\n"));
} }
free_spnego_data(&spnego); spnego_free_data(&spnego);
if (!NT_STATUS_EQUAL(nt_status, NT_STATUS_MORE_PROCESSING_REQUIRED)) { if (!NT_STATUS_EQUAL(nt_status, NT_STATUS_MORE_PROCESSING_REQUIRED)) {
return nt_status; return nt_status;
} }
@ -245,7 +245,7 @@ NTSTATUS gensec_spnego_update(struct gensec_security *gensec_security, TALLOC_CT
spnego_out.negTokenInit.mechListMIC = null_data_blob; spnego_out.negTokenInit.mechListMIC = null_data_blob;
spnego_out.negTokenInit.mechToken = unwrapped_out; spnego_out.negTokenInit.mechToken = unwrapped_out;
if (write_spnego_data(out_mem_ctx, out, &spnego_out) == -1) { if (spnego_write_data(out_mem_ctx, out, &spnego_out) == -1) {
DEBUG(1, ("Failed to write SPENGO reply to NEG_TOKEN_INIT\n")); DEBUG(1, ("Failed to write SPENGO reply to NEG_TOKEN_INIT\n"));
return NT_STATUS_INVALID_PARAMETER; return NT_STATUS_INVALID_PARAMETER;
} }
@ -278,7 +278,7 @@ NTSTATUS gensec_spnego_update(struct gensec_security *gensec_security, TALLOC_CT
} }
spnego_state->result = spnego.negTokenTarg.negResult; spnego_state->result = spnego.negTokenTarg.negResult;
free_spnego_data(&spnego); spnego_free_data(&spnego);
if (NT_STATUS_EQUAL(nt_status, NT_STATUS_MORE_PROCESSING_REQUIRED)) { if (NT_STATUS_EQUAL(nt_status, NT_STATUS_MORE_PROCESSING_REQUIRED)) {
/* compose reply */ /* compose reply */
@ -288,7 +288,7 @@ NTSTATUS gensec_spnego_update(struct gensec_security *gensec_security, TALLOC_CT
spnego_out.negTokenTarg.responseToken = unwrapped_out; spnego_out.negTokenTarg.responseToken = unwrapped_out;
spnego_out.negTokenTarg.mechListMIC = null_data_blob; spnego_out.negTokenTarg.mechListMIC = null_data_blob;
if (write_spnego_data(out_mem_ctx, out, &spnego_out) == -1) { if (spnego_write_data(out_mem_ctx, out, &spnego_out) == -1) {
DEBUG(1, ("Failed to write SPENGO reply to NEG_TOKEN_TARG\n")); DEBUG(1, ("Failed to write SPENGO reply to NEG_TOKEN_TARG\n"));
return NT_STATUS_INVALID_PARAMETER; return NT_STATUS_INVALID_PARAMETER;
} }
@ -302,7 +302,7 @@ NTSTATUS gensec_spnego_update(struct gensec_security *gensec_security, TALLOC_CT
return nt_status; return nt_status;
} else { } else {
free_spnego_data(&spnego); spnego_free_data(&spnego);
DEBUG(1, ("Invalid SPENGO request: %d\n", spnego.type)); DEBUG(1, ("Invalid SPENGO request: %d\n", spnego.type));
return NT_STATUS_INVALID_PARAMETER; return NT_STATUS_INVALID_PARAMETER;
} }

View File

@ -243,7 +243,7 @@ static BOOL write_negTokenTarg(ASN1_DATA *asn1, struct spnego_negTokenTarg *toke
return !asn1->has_error; return !asn1->has_error;
} }
ssize_t read_spnego_data(DATA_BLOB data, struct spnego_data *token) ssize_t spnego_read_data(DATA_BLOB data, struct spnego_data *token)
{ {
ASN1_DATA asn1; ASN1_DATA asn1;
ssize_t ret = -1; ssize_t ret = -1;
@ -276,7 +276,7 @@ ssize_t read_spnego_data(DATA_BLOB data, struct spnego_data *token)
return ret; return ret;
} }
ssize_t write_spnego_data(TALLOC_CTX *mem_ctx, DATA_BLOB *blob, struct spnego_data *spnego) ssize_t spnego_write_data(TALLOC_CTX *mem_ctx, DATA_BLOB *blob, struct spnego_data *spnego)
{ {
ASN1_DATA asn1; ASN1_DATA asn1;
ssize_t ret = -1; ssize_t ret = -1;
@ -307,7 +307,7 @@ ssize_t write_spnego_data(TALLOC_CTX *mem_ctx, DATA_BLOB *blob, struct spnego_da
return ret; return ret;
} }
BOOL free_spnego_data(struct spnego_data *spnego) BOOL spnego_free_data(struct spnego_data *spnego)
{ {
BOOL ret = True; BOOL ret = True;