pgsql: Use AbsoluteConfigLocation() when building an included path in h - Mailing list pgsql-committers

From Michael Paquier
Subject pgsql: Use AbsoluteConfigLocation() when building an included path in h
Date
Msg-id E1osYQP-000Et7-BL@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
Use AbsoluteConfigLocation() when building an included path in hba.c

The code building an absolute path to a file included, as prefixed by
'@' in authentication files, for user and database lists uses the same
logic as for GUCs, except that it has no need to know about DataDir as
there is always a calling file to rely to build the base directory path.
The refactoring done in a1a7bb8 makes this move straight-forward, and
unifies the code used for GUCs and authentication files, and the
intention is to rely also on that for the upcoming patch to be able to
include full files from HBA or ident files.

Note that this gets rid of an inconsistency introduced in 370f909, that
copied the logic coming from GUCs but applied it for files included in
authentication files, where the result buffer given to
join_path_components() must have a size of MAXPGPATH.  Based on a
double-check of the existing code, all the other callers of
join_path_components() already do that, except the code path changed
here.

Discussion: https://postgr.es/m/Y2igk7q8OMpg+Yta@paquier.xyz

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/6bbd8b73857a337e3aba2f6cdcaca6355b4c2b51

Modified Files
--------------
src/backend/libpq/hba.c            | 17 ++---------------
src/backend/utils/misc/conffiles.c |  4 ++--
2 files changed, 4 insertions(+), 17 deletions(-)


pgsql-committers by date:

Previous
From: Tom Lane
Date:
Subject: pgsql: Doc: improve tutorial section about grouped aggregates.
Next
From: Thomas Munro
Date:
Subject: pgsql: Provide sigaction() for Windows.