diff options
| author | Peter Eisentraut | 2019-09-05 06:15:58 +0000 |
|---|---|---|
| committer | Peter Eisentraut | 2019-09-05 06:30:42 +0000 |
| commit | 74a308cf5221f491776fcdb4dc36eb61678dbc6f (patch) | |
| tree | c2e9a146616d9b40dcd606db4030abcd1b1fe25b /configure | |
| parent | ae060a52b2881ea842f596fa78b8d09f9a91b149 (diff) | |
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
Diffstat (limited to 'configure')
| -rwxr-xr-x | configure | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/configure b/configure index f14709ed1e0..b3c92764be8 100755 --- a/configure +++ b/configure @@ -15087,7 +15087,7 @@ fi LIBS_including_readline="$LIBS" LIBS=`echo "$LIBS" | sed -e 's/-ledit//g' -e 's/-lreadline//g'` -for ac_func in cbrt clock_gettime copyfile fdatasync getifaddrs getpeerucred getrlimit mbstowcs_l memmove poll posix_fallocate ppoll pstat pthread_is_threaded_np readlink setproctitle setproctitle_fast setsid shm_open strchrnul strsignal symlink sync_file_range uselocale utime utimes wcstombs_l +for ac_func in cbrt clock_gettime copyfile fdatasync getifaddrs getpeerucred getrlimit mbstowcs_l memset_s memmove poll posix_fallocate ppoll pstat pthread_is_threaded_np readlink setproctitle setproctitle_fast setsid shm_open strchrnul strsignal symlink sync_file_range uselocale utime utimes wcstombs_l do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" @@ -15739,6 +15739,19 @@ esac fi +ac_fn_c_check_func "$LINENO" "explicit_bzero" "ac_cv_func_explicit_bzero" +if test "x$ac_cv_func_explicit_bzero" = xyes; then : + $as_echo "#define HAVE_EXPLICIT_BZERO 1" >>confdefs.h + +else + case " $LIBOBJS " in + *" explicit_bzero.$ac_objext "* ) ;; + *) LIBOBJS="$LIBOBJS explicit_bzero.$ac_objext" + ;; +esac + +fi + ac_fn_c_check_func "$LINENO" "fls" "ac_cv_func_fls" if test "x$ac_cv_func_fls" = xyes; then : $as_echo "#define HAVE_FLS 1" >>confdefs.h |
