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: Handle errors during GSSAPI startup better
Date: Fri, 05 Apr 2019 02:54:35 +0000
Message-ID: <E1hCEzz-0000z1-Sn@gemulon.postgresql.org> (raw)

Handle errors during GSSAPI startup better

There was some confusion over the format of the error message returned
from the server during GSSAPI startup; specifically, it was expected
that a length would be returned when, in reality, at this early stage in
the startup sequence, no length is returned from the server as part of
an error message.

Correct the client-side code for dealing with error messages sent by the
server during startup by simply reading what's available into our
buffer, after we've discovered it's an error message, and then reporting
back what was returned.

In passing, also add in documentation of the environment variable
PGGSSENCMODE which was missed previously, and adjust the code to look
for the PGGSSENCMODE variable (the environment variable change was
missed in the prior GSSMODE -> GSSENCMODE commit).

Error-handling issue discovered by Peter Eisentraut, the rest were items
discovered during testing of the error handling.

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/c46c85d4594d52fb34d36d4761bb9cfc5626f20b

Modified Files
--------------
doc/src/sgml/libpq.sgml                 | 10 ++++++++++
src/interfaces/libpq/fe-connect.c       |  4 ++--
src/interfaces/libpq/fe-secure-gssapi.c | 34 ++++++++-------------------------
3 files changed, 20 insertions(+), 28 deletions(-)



Message-ID: <E1hCEzz-0000z1-Sn@gemulon.postgresql.org>
Permalink:  ../E1hCEzz-0000z1-Sn@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1hCEzz-0000z1-Sn@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: Handle errors during GSSAPI startup better
  In-Reply-To: <E1hCEzz-0000z1-Sn@gemulon.postgresql.org>
  References: <E1hCEzz-0000z1-Sn@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