Re: Expand the use of check_canonical_path() for more GUCs - Mailing list pgsql-hackers

From Michael Paquier
Subject Re: Expand the use of check_canonical_path() for more GUCs
Date
Msg-id 20200520070326.GF2355@paquier.xyz
Whole thread Raw
In response to Re: Expand the use of check_canonical_path() for more GUCs  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Expand the use of check_canonical_path() for more GUCs  (Mark Dilger <mark.dilger@enterprisedb.com>)
List pgsql-hackers
On Tue, May 19, 2020 at 09:32:15AM -0400, Tom Lane wrote:
> Hm, I'm pretty certain that data_directory does not need this because
> canonicalization is done elsewhere; the most that you could accomplish
> there is to cause problems.  Dunno about the rest.

Hmm.  I missed that this is getting done in SelectConfigFiles() first
by the postmaster so that's not necessary, which also does the work
for hba_file and ident_file.  config_file does not need that either as
AbsoluteConfigLocation() does the same work via ParseConfigFile().  So
perhaps we could add a comment or such about that?  Attached is an
idea.

The rest is made of PromoteTriggerFile, pg_krb_server_keyfile,
ssl_cert_file, ssl_key_file, ssl_ca_file, ssl_crl_file and
ssl_dh_params_file where loaded values are taken as-is, so applying
canonicalization would be helpful there, no?
--
Michael

Attachment

pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: explicit_bzero for sslpassword
Next
From: Michael Paquier
Date:
Subject: Re: Expand the use of check_canonical_path() for more GUCs