pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Michael Paquier <michael@paquier.xyz>
Cc: Christoph Moench-Tegeder <cmt@burggraben.net>
Cc: Michael Mühlbeyer <Michael.Muehlbeyer@trivadis.com>
Cc: pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>
Subject: Re: md5 issues Postgres14 on OL7
Date: Fri, 07 Jan 2022 17:40:09 -0500
Message-ID: <1387391.1641595209@sss.pgh.pa.us> (raw)
In-Reply-To: <YdeiBTC2cXqDhbpN@paquier.xyz>
References: <89B7F072-5BBE-4C92-903E-D83E865D9367@trivadis.com>
	<YcCRp9QvQvCZ7ODI@elch.exwg.net>
	<YdQ1GLqQ/Vq6LwW9@paquier.xyz>
	<4038656.1641318875@sss.pgh.pa.us>
	<YdUx+6Sm5T0II8Un@paquier.xyz>
	<4190764.1641362933@sss.pgh.pa.us>
	<YdVEGLO/Ft7FUWF6@paquier.xyz>
	<YdamS8Sdwmiu4gsN@paquier.xyz>
	<1084379.1641487204@sss.pgh.pa.us>
	<YdeiBTC2cXqDhbpN@paquier.xyz>

Michael Paquier <michael@paquier.xyz> writes:
> On Thu, Jan 06, 2022 at 11:40:04AM -0500, Tom Lane wrote:
>> Also, I wonder if this shouldn't be unified with the SSLerrmessage()
>> support found in be-secure-openssl.c and fe-secure-openssl.c.

> Guess so.  HEAD could be poked at for this part.  I recall looking at
> that once by that did not seem worth the complications.

Yeah, I suppose there's only a couple lines of code to be saved,
and the complexity of dealing with multiple memory allocation
conventions would outweigh that.

> What do you think?

Hm, you still have cast-away-const in md5_crypt_verify and
plain_crypt_verify.  Can we adjust their APIs to make them
return const char * as well (and then their API spec is that
the caller must never free the string, rather than being
vague about it)?

The other thing that bothers me slightly is that it looks like
some code paths could end up passing a NULL string pointer to
ereport or sprintf, since you don't positively guarantee that
an error will return a string there.  I suppose this is safe
since 3779ac62d, but I don't really want to start making API
specs depend on it.

			regards, tom lane





view thread (16+ messages)  latest in thread

Message-ID: <1387391.1641595209@sss.pgh.pa.us>
Permalink:  ../1387391.1641595209@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/1387391.1641595209@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: tgl@sss.pgh.pa.us, michael@paquier.xyz, cmt@burggraben.net, Michael.Muehlbeyer@trivadis.com
  Subject: Re: md5 issues Postgres14 on OL7
  In-Reply-To: <1387391.1641595209@sss.pgh.pa.us>
  References: <89B7F072-5BBE-4C92-903E-D83E865D9367@trivadis.com> <YcCRp9QvQvCZ7ODI@elch.exwg.net> <YdQ1GLqQ/Vq6LwW9@paquier.xyz> <4038656.1641318875@sss.pgh.pa.us> <YdUx+6Sm5T0II8Un@paquier.xyz> <4190764.1641362933@sss.pgh.pa.us> <YdVEGLO/Ft7FUWF6@paquier.xyz> <YdamS8Sdwmiu4gsN@paquier.xyz> <1084379.1641487204@sss.pgh.pa.us> <YdeiBTC2cXqDhbpN@paquier.xyz> <1387391.1641595209@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox