stupid variable renaming

git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@4023 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Assar Westerlund
1997-11-16 09:50:50 +00:00
parent 7de203cee4
commit 62c5226ad9
2 changed files with 39 additions and 39 deletions

View File

@@ -47,22 +47,22 @@ krb5_rd_priv(krb5_context context,
krb5_data *outbuf, krb5_data *outbuf,
/*krb5_replay_data*/ void *outdata) /*krb5_replay_data*/ void *outdata)
{ {
krb5_error_code r; krb5_error_code ret;
KRB_PRIV priv; KRB_PRIV priv;
EncKrbPrivPart part; EncKrbPrivPart part;
size_t len; size_t len;
krb5_data plain; krb5_data plain;
krb5_keyblock *key; krb5_keyblock *key;
r = decode_KRB_PRIV (inbuf->data, inbuf->length, &priv, &len); ret = decode_KRB_PRIV (inbuf->data, inbuf->length, &priv, &len);
if (r) if (ret)
goto failure; goto failure;
if (priv.pvno != 5) { if (priv.pvno != 5) {
r = KRB5KRB_AP_ERR_BADVERSION; ret = KRB5KRB_AP_ERR_BADVERSION;
goto failure; goto failure;
} }
if (priv.msg_type != krb_priv) { if (priv.msg_type != krb_priv) {
r = KRB5KRB_AP_ERR_MSG_TYPE; ret = KRB5KRB_AP_ERR_MSG_TYPE;
goto failure; goto failure;
} }
@@ -75,18 +75,18 @@ krb5_rd_priv(krb5_context context,
else else
key = auth_context->keyblock; key = auth_context->keyblock;
r = krb5_decrypt (context, ret = krb5_decrypt (context,
priv.enc_part.cipher.data, priv.enc_part.cipher.data,
priv.enc_part.cipher.length, priv.enc_part.cipher.length,
priv.enc_part.etype, priv.enc_part.etype,
key, key,
&plain); &plain);
if (r) if (ret)
goto failure; goto failure;
r = decode_EncKrbPrivPart (plain.data, plain.length, &part, &len); ret = decode_EncKrbPrivPart (plain.data, plain.length, &part, &len);
krb5_data_free (&plain); krb5_data_free (&plain);
if (r) if (ret)
goto failure; goto failure;
/* check sender address */ /* check sender address */
@@ -96,7 +96,7 @@ krb5_rd_priv(krb5_context context,
&& !krb5_address_compare (context, && !krb5_address_compare (context,
auth_context->remote_address, auth_context->remote_address,
part.s_address)) { part.s_address)) {
r = KRB5KRB_AP_ERR_BADADDR; ret = KRB5KRB_AP_ERR_BADADDR;
goto failure_part; goto failure_part;
} }
@@ -107,7 +107,7 @@ krb5_rd_priv(krb5_context context,
&& !krb5_address_compare (context, && !krb5_address_compare (context,
auth_context->local_address, auth_context->local_address,
part.r_address)) { part.r_address)) {
r = KRB5KRB_AP_ERR_BADADDR; ret = KRB5KRB_AP_ERR_BADADDR;
goto failure_part; goto failure_part;
} }
@@ -119,7 +119,7 @@ krb5_rd_priv(krb5_context context,
if (part.timestamp == NULL || if (part.timestamp == NULL ||
part.usec == NULL || part.usec == NULL ||
abs(*part.timestamp - sec) > context->max_skew) { abs(*part.timestamp - sec) > context->max_skew) {
r = KRB5KRB_AP_ERR_SKEW; ret = KRB5KRB_AP_ERR_SKEW;
goto failure_part; goto failure_part;
} }
} }
@@ -130,13 +130,13 @@ krb5_rd_priv(krb5_context context,
if (auth_context->flags & KRB5_AUTH_CONTEXT_DO_SEQUENCE) { if (auth_context->flags & KRB5_AUTH_CONTEXT_DO_SEQUENCE) {
if (part.seq_number == NULL || if (part.seq_number == NULL ||
*part.seq_number != ++auth_context->remote_seqnumber) { *part.seq_number != ++auth_context->remote_seqnumber) {
r = KRB5KRB_AP_ERR_BADORDER; ret = KRB5KRB_AP_ERR_BADORDER;
goto failure_part; goto failure_part;
} }
} }
r = krb5_data_copy (outbuf, part.user_data.data, part.user_data.length); ret = krb5_data_copy (outbuf, part.user_data.data, part.user_data.length);
if (r) if (ret)
goto failure_part; goto failure_part;
free_EncKrbPrivPart (&part); free_EncKrbPrivPart (&part);
@@ -148,5 +148,5 @@ failure_part:
failure: failure:
free_KRB_PRIV (&priv); free_KRB_PRIV (&priv);
return r; return ret;
} }

View File

@@ -47,24 +47,24 @@ krb5_rd_safe(krb5_context context,
krb5_data *outbuf, krb5_data *outbuf,
/*krb5_replay_data*/ void *outdata) /*krb5_replay_data*/ void *outdata)
{ {
krb5_error_code r; krb5_error_code ret;
KRB_SAFE safe; KRB_SAFE safe;
size_t len; size_t len;
r = decode_KRB_SAFE (inbuf->data, inbuf->length, &safe, &len); ret = decode_KRB_SAFE (inbuf->data, inbuf->length, &safe, &len);
if (r) if (ret)
goto failure; goto failure;
if (safe.pvno != 5) { if (safe.pvno != 5) {
r = KRB5KRB_AP_ERR_BADVERSION; ret = KRB5KRB_AP_ERR_BADVERSION;
goto failure; goto failure;
} }
if (safe.msg_type != krb_safe) { if (safe.msg_type != krb_safe) {
r = KRB5KRB_AP_ERR_MSG_TYPE; ret = KRB5KRB_AP_ERR_MSG_TYPE;
goto failure; goto failure;
} }
if (!krb5_checksum_is_keyed(safe.cksum.cksumtype) if (!krb5_checksum_is_keyed(safe.cksum.cksumtype)
|| !krb5_checksum_is_collision_proof(safe.cksum.cksumtype)) { || !krb5_checksum_is_collision_proof(safe.cksum.cksumtype)) {
r = KRB5KRB_AP_ERR_INAPP_CKSUM; ret = KRB5KRB_AP_ERR_INAPP_CKSUM;
goto failure; goto failure;
} }
@@ -75,7 +75,7 @@ krb5_rd_safe(krb5_context context,
&& !krb5_address_compare (context, && !krb5_address_compare (context,
auth_context->remote_address, auth_context->remote_address,
safe.safe_body.s_address)) { safe.safe_body.s_address)) {
r = KRB5KRB_AP_ERR_BADADDR; ret = KRB5KRB_AP_ERR_BADADDR;
goto failure; goto failure;
} }
@@ -86,7 +86,7 @@ krb5_rd_safe(krb5_context context,
&& !krb5_address_compare (context, && !krb5_address_compare (context,
auth_context->local_address, auth_context->local_address,
safe.safe_body.r_address)) { safe.safe_body.r_address)) {
r = KRB5KRB_AP_ERR_BADADDR; ret = KRB5KRB_AP_ERR_BADADDR;
goto failure; goto failure;
} }
@@ -99,7 +99,7 @@ krb5_rd_safe(krb5_context context,
if (safe.safe_body.timestamp == NULL || if (safe.safe_body.timestamp == NULL ||
safe.safe_body.usec == NULL || safe.safe_body.usec == NULL ||
abs(*safe.safe_body.timestamp - sec) > context->max_skew) { abs(*safe.safe_body.timestamp - sec) > context->max_skew) {
r = KRB5KRB_AP_ERR_SKEW; ret = KRB5KRB_AP_ERR_SKEW;
goto failure; goto failure;
} }
} }
@@ -109,7 +109,7 @@ krb5_rd_safe(krb5_context context,
if (auth_context->flags & KRB5_AUTH_CONTEXT_DO_SEQUENCE) { if (auth_context->flags & KRB5_AUTH_CONTEXT_DO_SEQUENCE) {
if (safe.safe_body.seq_number == NULL || if (safe.safe_body.seq_number == NULL ||
*safe.safe_body.seq_number != ++auth_context->remote_seqnumber) { *safe.safe_body.seq_number != ++auth_context->remote_seqnumber) {
r = KRB5KRB_AP_ERR_BADORDER; ret = KRB5KRB_AP_ERR_BADORDER;
goto failure; goto failure;
} }
} }
@@ -130,19 +130,19 @@ krb5_rd_safe(krb5_context context,
&safe, &safe,
&len); &len);
r = krb5_verify_checksum (context, ret = krb5_verify_checksum (context,
buf + sizeof(buf) - len, buf + sizeof(buf) - len,
len, len,
auth_context->keyblock, auth_context->keyblock,
&c); &c);
free_Checksum (&c); free_Checksum (&c);
if (r) if (ret)
goto failure; goto failure;
} }
outbuf->length = safe.safe_body.user_data.length; outbuf->length = safe.safe_body.user_data.length;
outbuf->data = malloc(outbuf->length); outbuf->data = malloc(outbuf->length);
if (outbuf->data == NULL) { if (outbuf->data == NULL) {
r = ENOMEM; ret = ENOMEM;
goto failure; goto failure;
} }
memcpy (outbuf->data, safe.safe_body.user_data.data, outbuf->length); memcpy (outbuf->data, safe.safe_body.user_data.data, outbuf->length);
@@ -150,5 +150,5 @@ krb5_rd_safe(krb5_context context,
return 0; return 0;
failure: failure:
free_KRB_SAFE (&safe); free_KRB_SAFE (&safe);
return r; return ret;
} }