Fix RADIUS error reporting in hba file parsing

Started by Peter Eisentrautalmost 5 years ago2 messageshackers
Jump to latest
#1Peter Eisentraut
peter_e@gmx.net

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.

Attachments:

0001-Fix-RADIUS-error-reporting-in-hba-file-parsing.patchtext/plain; charset=UTF-8; name=0001-Fix-RADIUS-error-reporting-in-hba-file-parsing.patch; x-mac-creator=0; x-mac-type=0Download+48-43
#2Magnus Hagander
magnus@hagander.net
In reply to: Peter Eisentraut (#1)
Re: Fix RADIUS error reporting in hba file parsing

On Thu, May 27, 2021 at 10:36 AM Peter Eisentraut
<peter.eisentraut@enterprisedb.com> wrote:

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.

LGTM. I agree that the extra code from removing the function is worth
it if it makes it better for translations.

--
Magnus Hagander
Me: https://www.hagander.net/
Work: https://www.redpill-linpro.com/