Обсуждение: pgsql: Handle errors during GSSAPI startup better

Поиск
Список
Период
Сортировка

pgsql: Handle errors during GSSAPI startup better

От
Stephen Frost
Дата:
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(-)