Re: Allow file inclusion in pg_hba and pg_ident files - Mailing list pgsql-hackers

From Michael Paquier
Subject Re: Allow file inclusion in pg_hba and pg_ident files
Date
Msg-id Y2mrEIcUED81TGMT@paquier.xyz
Whole thread Raw
In response to Re: Allow file inclusion in pg_hba and pg_ident files  (Michael Paquier <michael@paquier.xyz>)
Responses Re: Allow file inclusion in pg_hba and pg_ident files
List pgsql-hackers
On Mon, Nov 07, 2022 at 03:07:15PM +0900, Michael Paquier wrote:
> Attached is a set of three patches:
> - 0001 changes tokenize_inc_file() to use AbsoluteConfigLocation().
> AbsoluteConfigLocation() uses a static buffer and a MAXPGPATH, but
> we'd rather change it to use a palloc()+strcpy() instead and remove
> the static restriction?  What do you think?  The same applies for the
> case where we use DataDir, actually, and it seems like there is no
> point in this path-length restriction in this code path.
> - 0002 invents the interface to open auth files and check for their
> depths, simplifying the main patch a bit as there is no need to track
> the depth level here and there anymore.
> - 0003 is the rebased patch, simplified after the other changes.  The
> bulk of the patch is in its TAP test.

CF bot unhappy as I have messed up with rules.out.  Rebased.  I have
removed the restriction on MAXPGPATH in AbsoluteConfigLocation() in
0001, while on it.  The absolute paths built on GUC or ident
inclusions are the same.
--
Michael

Attachment

pgsql-hackers by date:

Previous
From: Jacob Champion
Date:
Subject: Re: [PATCH] Add `verify-system` sslmode to use system CA pool for server cert
Next
From: David Rowley
Date:
Subject: Re: Add proper planner support for ORDER BY / DISTINCT aggregates