diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2017-04-17 12:51:40 -0400 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2017-04-17 12:51:40 -0400 |
commit | fbfeceb25362097c5552751427151a07d23b8241 (patch) | |
tree | abcc9aa66fab07fbb98def34890544920e3009c9 /src/backend/tcop/postgres.c | |
parent | fddc10146eb2cd9e35f8d6849cde88ea2461cdb1 (diff) |
Back-patch 9.4-era SSL renegotiation code into 9.3 and 9.2.
This back-patches 9.4 commits 31cf1a1a4, 86029b31e, and 36a3be654 into
the prior branches, along with relevant bits of b1aebbb6a and 7ce2a45ae.
We had foreseen doing this once the code was proven, but that never did
happen, probably because we got sufficiently fed up with renegotiation
to disable it by default. However, we have to do something now because
the prior code doesn't even compile against OpenSSL 1.1. Per discussion,
the best solution seems to be to make the older branches look like 9.4.
Discussion: https://postgr.es/m/20047.1492305247@sss.pgh.pa.us
Diffstat (limited to 'src/backend/tcop/postgres.c')
-rw-r--r-- | src/backend/tcop/postgres.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/backend/tcop/postgres.c b/src/backend/tcop/postgres.c index 3ba3a0c6142..4c140ee3154 100644 --- a/src/backend/tcop/postgres.c +++ b/src/backend/tcop/postgres.c @@ -553,16 +553,22 @@ prepare_for_client_read(void) /* * client_read_ended -- get out of the client-input state + * + * This is called just after low-level reads. It must preserve errno! */ void client_read_ended(void) { if (DoingCommandRead) { + int save_errno = errno; + ImmediateInterruptOK = false; DisableNotifyInterrupt(); DisableCatchupInterrupt(); + + errno = save_errno; } } |