pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Daniel Gustafsson <daniel@yesql.se>
Cc: pgsql-committers@lists.postgresql.org
Subject: Re: pgsql: Add TAP tests for contrib/sslinfo
Date: Tue, 30 Nov 2021 15:55:00 -0500
Message-ID: <1632478.1638305700@sss.pgh.pa.us> (raw)
In-Reply-To: <FB603D1D-2F48-48E1-B1BB-4DEF95DAF393@yesql.se>
References: <E1ms0iG-00050P-1G@gemulon.postgresql.org>
	<058AAA2B-06CA-4D1C-8D24-B9EA6632C072@yesql.se>
	<FB603D1D-2F48-48E1-B1BB-4DEF95DAF393@yesql.se>

Daniel Gustafsson <daniel@yesql.se> writes:
> Scratch that, all the copying for tests 001 through 003 had failed.  I clearly
> need another coffee.
> The question still stands though, does anyone have any ideas on what could've
> happened as I'm currently drawing a blank?

Dunno, but it strikes me that the libpq code issuing this error is not up
to our usual quality standards.  It's just assuming that the stat()
failure is ENOENT, and I have a sneaking suspicion that that's not so.

I'm inclined to suggest that we start by changing that code
to look like, say,

        if (stat(fnbuf, &buf) != 0)
        {
            if (errno == ENOENT)
                appendPQExpBuffer(&conn->errorMessage,
                                  libpq_gettext("certificate present, but not private key file \"%s\"\n"),
                                  fnbuf);
            else
                appendPQExpBuffer(&conn->errorMessage,
                                  libpq_gettext("could not stat private key file \"%s\": %m\n"),
                                  fnbuf);
            return -1;
        }

and see what we learn.

			regards, tom lane





view thread (24+ messages)  latest in thread

Message-ID: <1632478.1638305700@sss.pgh.pa.us>
Permalink:  ../1632478.1638305700@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/1632478.1638305700@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-committers@postgresql.org
  Cc: tgl@sss.pgh.pa.us, daniel@yesql.se
  Subject: Re: pgsql: Add TAP tests for contrib/sslinfo
  In-Reply-To: <1632478.1638305700@sss.pgh.pa.us>
  References: <E1ms0iG-00050P-1G@gemulon.postgresql.org> <058AAA2B-06CA-4D1C-8D24-B9EA6632C072@yesql.se> <FB603D1D-2F48-48E1-B1BB-4DEF95DAF393@yesql.se> <1632478.1638305700@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