kdc: Overwrite ‘error_code’ only if we have an actual error
‘r->error_code’ might have been set earlier, and we don’t want to overwrite it with a successful error code. Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
This commit is contained in:

committed by
Nico Williams

parent
243207f10a
commit
da9cad2047
@@ -2743,7 +2743,10 @@ _kdc_as_rep(astgs_request_t r)
|
|||||||
}
|
}
|
||||||
|
|
||||||
out:
|
out:
|
||||||
r->error_code = ret;
|
if (ret) {
|
||||||
|
/* Overwrite ‘error_code’ only if we have an actual error. */
|
||||||
|
r->error_code = ret;
|
||||||
|
}
|
||||||
{
|
{
|
||||||
krb5_error_code ret2 = _kdc_audit_request(r);
|
krb5_error_code ret2 = _kdc_audit_request(r);
|
||||||
if (ret2) {
|
if (ret2) {
|
||||||
|
@@ -2161,7 +2161,10 @@ _kdc_tgs_rep(astgs_request_t r)
|
|||||||
}
|
}
|
||||||
|
|
||||||
out:
|
out:
|
||||||
r->error_code = ret;
|
if (ret) {
|
||||||
|
/* Overwrite ‘error_code’ only if we have an actual error. */
|
||||||
|
r->error_code = ret;
|
||||||
|
}
|
||||||
{
|
{
|
||||||
krb5_error_code ret2 = _kdc_audit_request(r);
|
krb5_error_code ret2 = _kdc_audit_request(r);
|
||||||
if (ret2) {
|
if (ret2) {
|
||||||
|
Reference in New Issue
Block a user