pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Stephen Frost <sfrost@snowman.net>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Fix GSS client to non-GSS server connection
Date: Sat, 02 May 2020 15:40:43 +0000
Message-ID: <E1jUuFv-000464-9j@gemulon.postgresql.org> (raw)

Fix GSS client to non-GSS server connection

If the client is compiled with GSSAPI support and tries to start up GSS
with the server, but the server is not compiled with GSSAPI support, we
would mistakenly end up falling through to call ProcessStartupPacket
with secure_done = true, but the client might then try to perform SSL,
which the backend wouldn't understand and we'd end up failing the
connection with:

FATAL:  unsupported frontend protocol 1234.5679: server supports 2.0 to 3.0

Fix by arranging to track ssl_done independently from gss_done, instead
of trying to use the same boolean for both.

Author: Andrew Gierth
Discussion: https://postgr.es/m/87h82kzwqn.fsf@news-spur.riddles.org.uk
Backpatch: 12-, where GSSAPI encryption was added.

Branch
------
REL_12_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/79e594cf04754d55196d2ce54fc869ccad5fa9c3

Modified Files
--------------
src/backend/postmaster/postmaster.c | 37 ++++++++++++++++++++++++-------------
1 file changed, 24 insertions(+), 13 deletions(-)



view thread (2+ messages)

Message-ID: <E1jUuFv-000464-9j@gemulon.postgresql.org>
Permalink:  ../E1jUuFv-000464-9j@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1jUuFv-000464-9j@gemulon.postgresql.org

 · 

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: sfrost@snowman.net
  Subject: Re: pgsql: Fix GSS client to non-GSS server connection
  In-Reply-To: <E1jUuFv-000464-9j@gemulon.postgresql.org>
  References: <E1jUuFv-000464-9j@gemulon.postgresql.org>

* 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