Re: md5 issues Postgres14 on OL7

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Michael Paquier <michael(at)paquier(dot)xyz>
Cc: Christoph Moench-Tegeder <cmt(at)burggraben(dot)net>, Michael Mühlbeyer <Michael(dot)Muehlbeyer(at)trivadis(dot)com>, "pgsql-general(at)lists(dot)postgresql(dot)org" <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Re: md5 issues Postgres14 on OL7
Date: 2022-01-07 22:40:09
Message-ID: 1387391.1641595209@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Michael Paquier <michael(at)paquier(dot)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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Theodore M Rolle, Jr. 2022-01-08 01:12:16 Re: Tab-completion error...?
Previous Message Allie Crawford 2022-01-07 21:57:28 Stream Replication not working