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:
parent
626bb153c4
commit
3f57c8f596
@ -152,7 +152,7 @@ NTSTATUS gensec_spnego_update(struct gensec_security *gensec_security, TALLOC_CT
|
||||
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) {
|
||||
int i;
|
||||
@ -180,7 +180,7 @@ NTSTATUS gensec_spnego_update(struct gensec_security *gensec_security, TALLOC_CT
|
||||
} else {
|
||||
|
||||
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,
|
||||
spnego_state->expected_packet));
|
||||
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"));
|
||||
}
|
||||
|
||||
free_spnego_data(&spnego);
|
||||
spnego_free_data(&spnego);
|
||||
if (!NT_STATUS_EQUAL(nt_status, NT_STATUS_MORE_PROCESSING_REQUIRED)) {
|
||||
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.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"));
|
||||
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;
|
||||
free_spnego_data(&spnego);
|
||||
spnego_free_data(&spnego);
|
||||
|
||||
if (NT_STATUS_EQUAL(nt_status, NT_STATUS_MORE_PROCESSING_REQUIRED)) {
|
||||
/* 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.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"));
|
||||
return NT_STATUS_INVALID_PARAMETER;
|
||||
}
|
||||
@ -302,7 +302,7 @@ NTSTATUS gensec_spnego_update(struct gensec_security *gensec_security, TALLOC_CT
|
||||
|
||||
return nt_status;
|
||||
} else {
|
||||
free_spnego_data(&spnego);
|
||||
spnego_free_data(&spnego);
|
||||
DEBUG(1, ("Invalid SPENGO request: %d\n", spnego.type));
|
||||
return NT_STATUS_INVALID_PARAMETER;
|
||||
}
|
||||
|
@ -243,7 +243,7 @@ static BOOL write_negTokenTarg(ASN1_DATA *asn1, struct spnego_negTokenTarg *toke
|
||||
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;
|
||||
ssize_t ret = -1;
|
||||
@ -276,7 +276,7 @@ ssize_t read_spnego_data(DATA_BLOB data, struct spnego_data *token)
|
||||
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;
|
||||
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;
|
||||
}
|
||||
|
||||
BOOL free_spnego_data(struct spnego_data *spnego)
|
||||
BOOL spnego_free_data(struct spnego_data *spnego)
|
||||
{
|
||||
BOOL ret = True;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user