Skip to content

Commit 5106f33

Browse files
danielgustafssonCommitfest Bot
authored andcommitted
libpq: Make SSL errorhandling in backend threadsafe
In order to make the errorhandling code in backend libpq be thread- safe the global variable used by the certificate verification call- back need to be replaced with passing private data, and the call to strerror need to be replaced with strerror_r which use an allocated buffer passed back instead of the static buffer. * The callback use a new member in the Port struct for passing the error detail string, and the Port struct is in turn passed as private data in the SSL object * The strerror call is replaced with a strerror_r and the static errbuf buffer is palloced with the caller being responsible for cleanup. Author: Daniel Gustafsson <[email protected]> Reviewed-by: Peter Eisentraut <[email protected]> Discussion: https://postgr.es/m/[email protected] fixup
1 parent 5092aae commit 5106f33

File tree

2 files changed

+104
-44
lines changed

2 files changed

+104
-44
lines changed

0 commit comments

Comments
 (0)