summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/conf/conf_mod.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libcrypto/conf/conf_mod.c')
-rw-r--r--src/lib/libcrypto/conf/conf_mod.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/lib/libcrypto/conf/conf_mod.c b/src/lib/libcrypto/conf/conf_mod.c
index ae62f4abde..e58582a5ec 100644
--- a/src/lib/libcrypto/conf/conf_mod.c
+++ b/src/lib/libcrypto/conf/conf_mod.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: conf_mod.c,v 1.20 2014/06/12 15:49:28 deraadt Exp $ */ 1/* $OpenBSD: conf_mod.c,v 1.21 2014/06/23 22:19:02 deraadt Exp $ */
2/* Written by Stephen Henson (steve@openssl.org) for the OpenSSL 2/* Written by Stephen Henson (steve@openssl.org) for the OpenSSL
3 * project 2001. 3 * project 2001.
4 */ 4 */
@@ -541,9 +541,10 @@ CONF_module_set_usr_data(CONF_MODULE *pmod, void *usr_data)
541char * 541char *
542CONF_get1_default_config_file(void) 542CONF_get1_default_config_file(void)
543{ 543{
544 char *file; 544 char *file = NULL;
545 545
546 file = getenv("OPENSSL_CONF"); 546 if (issetugid() == 0)
547 file = getenv("OPENSSL_CONF");
547 if (file) 548 if (file)
548 return BUF_strdup(file); 549 return BUF_strdup(file);
549 if (asprintf(&file, "%s/openssl.cnf", 550 if (asprintf(&file, "%s/openssl.cnf",