1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-30 11:03:19 +03:00

Use explicit_bzero

Use the explicit_bzero() function in places where it is important that
security information such as passwords is cleared from memory.  There
might be other places where it could be useful; this is just an
initial collection.

For platforms that don't have explicit_bzero(), provide various
fallback implementations.  (explicit_bzero() itself isn't standard,
but as Linux/glibc, FreeBSD, and OpenBSD have it, it's the most common
spelling, so it makes sense to make that the invocation point.)

Discussion: https://www.postgresql.org/message-id/flat/42d26bde-5d5b-c90d-87ae-6cab875f73be%402ndquadrant.com
This commit is contained in:
Peter Eisentraut
2019-09-05 08:15:58 +02:00
parent ae060a52b2
commit 74a308cf52
9 changed files with 99 additions and 2 deletions

View File

@ -1594,6 +1594,7 @@ AC_CHECK_FUNCS(m4_normalize([
getpeerucred
getrlimit
mbstowcs_l
memset_s
memmove
poll
posix_fallocate
@ -1691,6 +1692,7 @@ fi
AC_REPLACE_FUNCS(m4_normalize([
dlopen
explicit_bzero
fls
getopt
getrusage