Re: [PATCH] Log details for client certificate failures
Jacob Champion <jchampion@timescale.com>
From: Jacob Champion <jchampion@timescale.com>
To: Andres Freund <andres@anarazel.de>
Cc: Tom Lane <tgl@sss.pgh.pa.us>,
Peter Eisentraut <peter.eisentraut@enterprisedb.com>, "pgsql-hackers@postgresql.org" <pgsql-hackers@postgresql.org>
Date: 2022-07-20T22:11:10Z
Lists: pgsql-hackers
Attachments
- v3-0001-pg_clean_ascii-escape-bytes-rather-than-lose-them.patch (text/x-patch) patch v3-0001
- v3-0002-Don-t-reflect-unescaped-cert-data-to-the-logs.patch (text/x-patch) patch v3-0002
On Tue, Jul 19, 2022 at 3:38 PM Andres Freund <andres@anarazel.de> wrote: > Or alternatively, perhaps we can just make pg_clean_ascii() return NULL > if allocation failed and then guc_strdup() the result in guc.c? The guc_strdup() approach really reduces the amount of code, so that's what I did in v3. I'm not following why we need to return NULL on failure, though -- both palloc() and guc_malloc() ERROR on failure, so is it okay to keep those semantics the same? > If we end up needing a two phase approach, why use the same function for > both phases? That seems quite awkward. Mostly so the byte counting always agrees between the two phases, no matter how the implementation evolves. But it's hopefully moot now. --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