Skip to content

Commit

Permalink
auth: Treat all negative responses from policy servers as drops
Browse files Browse the repository at this point in the history
Otherwise negative responses that are not -1 are considered
as success, which is wrong.
  • Loading branch information
cmouse committed Dec 12, 2018
1 parent c57df24 commit d9d7ab7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/auth/auth-request.c
Expand Up @@ -1042,7 +1042,7 @@ void auth_request_policy_check_callback(int result, void *context)
else
auth_request_log_debug(ctx->request, "policy", "Policy check action is %s",
action);
if (result == -1) {
if (result < 0) {
/* fail it right here and now */
auth_request_fail(ctx->request);
} else if (ctx->type != AUTH_POLICY_CHECK_TYPE_SUCCESS && result > 0 && !ctx->request->no_penalty) {
Expand Down

0 comments on commit d9d7ab7

Please sign in to comment.