Patch: Don't set LoadedSSL unless secure_initialize succeeds

From: Gurjeet Singh <gurjeet(at)singh(dot)im>
To: Postgres Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Patch: Don't set LoadedSSL unless secure_initialize succeeds
Date: 2022-05-22 06:41:18
Message-ID: CABwTF4VOUXC7bpfCzAmTpbsE71FiNnu=FFRB1CRzL1AviD=qWg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

The initialization in PostmasterMain() blindly turns on LoadedSSL,
irrespective of the outcome of secure_initialize(). I don't think
that's how it should behave, primarily because of the pattern followed
by the other places that call secure_initialize().

This patch makes PostmasterMain() behave identical to other places
(SIGHUP handler, and SubPostmasterMain()) where LoadedSSL is turned on
after checking success of secure_initialize() call. Upon failure of
secure_initialize(), it now emits a log message, instead of setting
LoadedSSL to true.

Best regards,
Gurjeet
http://Gurje.et

Attachment Content-Type Size
LoadedSSL.patch application/octet-stream 701 bytes

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Daniel Gustafsson 2022-05-22 07:17:37 Re: Patch: Don't set LoadedSSL unless secure_initialize succeeds
Previous Message Noah Misch 2022-05-22 04:54:27 Re: tweak to a few index tests to hits ambuildempty() routine.