(krb5_rd_priv): clear error string.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@21751 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 1997-2003 Kungliga Tekniska H<>gskolan
|
* Copyright (c) 1997-2007 Kungliga Tekniska H<>gskolan
|
||||||
* (Royal Institute of Technology, Stockholm, Sweden).
|
* (Royal Institute of Technology, Stockholm, Sweden).
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
@@ -55,13 +55,17 @@ krb5_rd_priv(krb5_context context,
|
|||||||
|
|
||||||
if ((auth_context->flags &
|
if ((auth_context->flags &
|
||||||
(KRB5_AUTH_CONTEXT_RET_TIME | KRB5_AUTH_CONTEXT_RET_SEQUENCE)) &&
|
(KRB5_AUTH_CONTEXT_RET_TIME | KRB5_AUTH_CONTEXT_RET_SEQUENCE)) &&
|
||||||
outdata == NULL)
|
outdata == NULL) {
|
||||||
|
krb5_clear_error_string (context);
|
||||||
return KRB5_RC_REQUIRED; /* XXX better error, MIT returns this */
|
return KRB5_RC_REQUIRED; /* XXX better error, MIT returns this */
|
||||||
|
}
|
||||||
|
|
||||||
memset(&priv, 0, sizeof(priv));
|
memset(&priv, 0, sizeof(priv));
|
||||||
ret = decode_KRB_PRIV (inbuf->data, inbuf->length, &priv, &len);
|
ret = decode_KRB_PRIV (inbuf->data, inbuf->length, &priv, &len);
|
||||||
if (ret)
|
if (ret) {
|
||||||
|
krb5_clear_error_string (context);
|
||||||
goto failure;
|
goto failure;
|
||||||
|
}
|
||||||
if (priv.pvno != 5) {
|
if (priv.pvno != 5) {
|
||||||
krb5_clear_error_string (context);
|
krb5_clear_error_string (context);
|
||||||
ret = KRB5KRB_AP_ERR_BADVERSION;
|
ret = KRB5KRB_AP_ERR_BADVERSION;
|
||||||
@@ -94,8 +98,10 @@ krb5_rd_priv(krb5_context context,
|
|||||||
|
|
||||||
ret = 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 (ret)
|
if (ret) {
|
||||||
|
krb5_clear_error_string (context);
|
||||||
goto failure;
|
goto failure;
|
||||||
|
}
|
||||||
|
|
||||||
/* check sender address */
|
/* check sender address */
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user