diff options
Diffstat (limited to 'crypto/rand/randfile.c')
-rw-r--r-- | crypto/rand/randfile.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/crypto/rand/randfile.c b/crypto/rand/randfile.c index c652ddcf1e..89720eb5cf 100644 --- a/crypto/rand/randfile.c +++ b/crypto/rand/randfile.c @@ -262,11 +262,9 @@ const char *RAND_file_name(char *buf, size_t size) } } #else - if (OPENSSL_issetugid() != 0) { + if ((s = ossl_safe_getenv("RANDFILE")) == NULL || *s == '\0') { use_randfile = 0; - } else if ((s = getenv("RANDFILE")) == NULL || *s == '\0') { - use_randfile = 0; - s = getenv("HOME"); + s = ossl_safe_getenv("HOME"); } #endif |