Commit 8446c963 authored by Nigel Kukard's avatar Nigel Kukard
Browse files

* Fixed tempfail inversion

- Closes bug #14
parent cf2a622f
......@@ -455,12 +455,17 @@ sub process_request {
$action = "tempfail";
# Check for "tempfail"
} elsif (lc($self->{'inifile'}{'database'}{'bypass_mode'}) eq "tempfail") {
$self->protocol_response(PROTO_PASS);
$self->protocol_response(PROTO_DB_ERROR);
$action = "tempfail";
# And for "bypass"
} elsif (lc($self->{'inifile'}{'database'}{'bypass_mode'}) eq "pass") {
$self->protocol_response(PROTO_DB_ERROR);
$self->protocol_response(PROTO_PASS);
$action = "pass";
# Lasty for invalid
} else {
$self->log(LOG_ERR,"[CBPOLICYD] bypass_mode is invalid, defaulting to tempfail");
$self->protocol_response(PROTO_DB_ERROR);
$action = "tempfail";
}
$self->maillog("module=Core, action=$action, host=%s, from=%s, to=%s, reason=db_failure_bypass",
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment