pgsql: Fix RADIUS error reporting in hba file parsing

From: Peter Eisentraut <peter(at)eisentraut(dot)org>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Fix RADIUS error reporting in hba file parsing
Date: 2021-05-31 17:00:54
Message-ID: E1lnlHa-0007WV-Ky@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Fix RADIUS error reporting in hba file parsing

The RADIUS-related checks in parse_hba_line() did not respect elevel
and did not fill in *err_msg. Also, verify_option_list_length()
pasted together error messages in an untranslatable way. To fix the
latter, remove the function and do the error checking inline. It's a
bit more verbose but only minimally longer, and it makes fixing the
first two issues straightforward.

Reviewed-by: Magnus Hagander <magnus(at)hagander(dot)net>
Discussion: https://www.postgresql.org/message-id/flat/8381e425-8c23-99b3-15ec-3115001db1b2%40enterprisedb.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/7c544ecdad814ccda709cfb6aa7d62840c3a7486

Modified Files
--------------
src/backend/libpq/hba.c | 90 ++++++++++++++++++++++++++-----------------------
1 file changed, 48 insertions(+), 42 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Thomas Munro 2021-05-31 23:32:45 pgsql: Fix error handling in replacement pthread_barrier_init().
Previous Message Tom Lane 2021-05-31 16:03:25 pgsql: Fix mis-planning of repeated application of a projection.