Re: [PATCH] Log details for client certificate failures
Jacob Champion <jchampion@timescale.com>
From: Jacob Champion <jchampion@timescale.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Andres Freund <andres@anarazel.de>, Peter Eisentraut <peter.eisentraut@enterprisedb.com>, "pgsql-hackers@postgresql.org" <pgsql-hackers@postgresql.org>
Date: 2022-07-21T23:29:35Z
Lists: pgsql-hackers
Attachments
- since-v3.diff.txt (text/plain)
- v4-0001-pg_clean_ascii-escape-bytes-rather-than-lose-them.patch (text/x-patch) patch v4-0001
- v4-0002-Don-t-reflect-unescaped-cert-data-to-the-logs.patch (text/x-patch) patch v4-0002
On Wed, Jul 20, 2022 at 3:42 PM Tom Lane <tgl@sss.pgh.pa.us> wrote: > Jacob Champion <jchampion@timescale.com> writes: > > I'm currently hardcoding an elevel of ERROR on the new guc_strdup()s, > > because that seems to be a common case for the check hooks. > > Really? That's almost certainly NOT okay. As an example, if you > have a problem with a new value loaded from postgresql.conf during > SIGHUP processing, throwing ERROR will cause the postmaster to exit. v4 attempts to fix this by letting the check hooks pass MCXT_ALLOC_NO_OOM to pg_clean_ascii(). (It's ignored in the frontend, which just mallocs.) > I wouldn't be too surprised if there are isolated cases where people > didn't understand what they were doing and wrote that, but that > needs to be fixed not emulated. I might be missing something, but in guc.c at least it appears to be the rule and not the exception. Thanks, --Jacob
Commits
-
Fix tiny memory leaks
- a9d58bfe8a3a 16.0 landed
-
Don't reflect unescaped cert data to the logs
- 257eb57b50f7 16.0 landed
-
pg_clean_ascii(): escape bytes rather than lose them
- 45b1a67a0fcb 16.0 landed
-
Log details for client certificate failures
- 3a0e385048ad 16.0 landed