Skip to content
Permalink
Browse files

print warnings if check query return nothing, OR pairs didn't match

  • Loading branch information
alandekok committed Aug 25, 2019
1 parent 5a3c272 commit c0f1f6559a4837feadb075b8da19f31ff3ee319f
Showing with 5 additions and 1 deletion.
  1. +5 −1 src/modules/rlm_sql/rlm_sql.c
@@ -1201,14 +1201,18 @@ static rlm_rcode_t mod_authorize(void *instance, REQUEST *request)
goto error;
}

if (rows == 0) goto skipreply; /* Don't need to free VPs we don't have */
if (rows == 0) {
RWDEBUG2("User not found in radcheck table.");
goto skipreply; /* Don't need to free VPs we don't have */
}

/*
* Only do this if *some* check pairs were returned
*/
RDEBUG2("User found in radcheck table");
user_found = true;
if (paircompare(request, request->packet->vps, check_tmp, &request->reply->vps) != 0) {
RWDEBUG2("check items do not match.");
fr_pair_list_free(&check_tmp);
check_tmp = NULL;
goto skipreply;

0 comments on commit c0f1f65

Please sign in to comment.
You can’t perform that action at this time.