Use secure_getenv(3) when available.
authorPauli <paul.dale@oracle.com>
Mon, 24 Sep 2018 01:21:18 +0000 (11:21 +1000)
committerPauli <paul.dale@oracle.com>
Mon, 24 Sep 2018 01:32:25 +0000 (11:32 +1000)
commit1abdf08284af055f68c5ece4c7c0efa8f2bf323a
tree80c87b6f5da1bb4a042372dafb882b5a83b3294a
parent4aa1739c111e1390909533e7b2f485bc655c2489
Use secure_getenv(3) when available.

Change all calls to getenv() inside libcrypto to use a new wrapper function
that use secure_getenv() if available and an issetugid then getenv if not.

CPU processor override flags are unchanged.

Extra checks for OPENSSL_issetugid() have been removed in favour of the
safe getenv.

Reviewed-by: Bernd Edlinger <bernd.edlinger@hotmail.de>
(Merged from https://github.com/openssl/openssl/pull/7047)

(cherry picked from commit 5c39a55d04ea6e6f734b627a050b9e702788d50d)
crypto/build.info
crypto/conf/conf_api.c
crypto/conf/conf_mod.c
crypto/ct/ct_log.c
crypto/engine/eng_list.c
crypto/getenv.c [new file with mode: 0644]
crypto/include/internal/cryptlib.h
crypto/pkcs12/p12_mutl.c
crypto/rand/randfile.c
crypto/x509/by_dir.c
crypto/x509/by_file.c