summaryrefslogtreecommitdiff
path: root/contrib/test_parser
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2025-10-05 16:27:47 -0400
committerTom Lane <tgl@sss.pgh.pa.us>2025-10-05 16:27:47 -0400
commitea78bd6d5d0f18c09db1e3ec6fd19be38d706030 (patch)
tree92db0b9073bbac33d497c8daba6b24f7a07f65d4 /contrib/test_parser
parent1a8b5b11e48a8fb086228542d1d4b379f23bdc1e (diff)
Use SOCK_ERRNO[_SET] in fe-secure-gssapi.c.HEADorigin/masterorigin/HEADmaster
On Windows, this code did not handle error conditions correctly at all, since it looked at "errno" which is not used for socket-related errors on that platform. This resulted, for example, in failure to connect to a PostgreSQL server with GSSAPI enabled. We have a convention for dealing with this within libpq, which is to use SOCK_ERRNO and SOCK_ERRNO_SET rather than touching errno directly; but the GSSAPI code is a relative latecomer and did not get that memo. (The equivalent backend code continues to use errno, because the backend does this differently. Maybe libpq's approach should be rethought someday.) Apparently nobody tries to build libpq with GSSAPI support on Windows, or we'd have heard about this before, because it's been broken all along. Back-patch to all supported branches. Author: Ning Wu <ning94803@gmail.com> Co-authored-by: Tom Lane <tgl@sss.pgh.pa.us> Discussion: https://postgr.es/m/CAFGqpvg-pRw=cdsUpKYfwY6D3d-m9tw8WMcAEE7HHWfm-oYWvw@mail.gmail.com Backpatch-through: 13
Diffstat (limited to 'contrib/test_parser')
0 files changed, 0 insertions, 0 deletions