diff options
author | Jack Lloyd <[email protected]> | 2018-12-29 09:15:28 -0500 |
---|---|---|
committer | Jack Lloyd <[email protected]> | 2018-12-29 09:15:28 -0500 |
commit | 30f79bda793634bb1891e61ee4ea998a64c9b13b (patch) | |
tree | 5e0f1b6bbbce02e790504cd01064ade94d17d58e /src/lib/ffi/ffi.cpp | |
parent | 69cad041fd2bf9bf09ca378537d28983a4fce03a (diff) |
Add OS::read_env_variable
Combines the priv check and the getenv call on one.
Diffstat (limited to 'src/lib/ffi/ffi.cpp')
-rw-r--r-- | src/lib/ffi/ffi.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib/ffi/ffi.cpp b/src/lib/ffi/ffi.cpp index cfc2cb2d5..b0c1f6e71 100644 --- a/src/lib/ffi/ffi.cpp +++ b/src/lib/ffi/ffi.cpp @@ -18,7 +18,7 @@ namespace Botan_FFI { int ffi_error_exception_thrown(const char* func_name, const char* exn, int rc) { - if(Botan::OS::running_in_privileged_state() == false && std::getenv("BOTAN_FFI_PRINT_EXCEPTIONS") != nullptr) + if(Botan::OS::read_env_variable("BOTAN_FFI_PRINT_EXCEPTIONS") != nullptr) { std::fprintf(stderr, "in %s exception '%s' returning %d\n", func_name, exn, rc); } |