diff options
Diffstat (limited to 'src/lib/libcrypto/x509/by_dir.c')
-rw-r--r-- | src/lib/libcrypto/x509/by_dir.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/lib/libcrypto/x509/by_dir.c b/src/lib/libcrypto/x509/by_dir.c index 21ba0a7bc2..187eba4515 100644 --- a/src/lib/libcrypto/x509/by_dir.c +++ b/src/lib/libcrypto/x509/by_dir.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: by_dir.c,v 1.27 2014/06/19 21:23:48 tedu Exp $ */ | 1 | /* $OpenBSD: by_dir.c,v 1.28 2014/06/23 22:19:02 deraadt Exp $ */ |
2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) |
3 | * All rights reserved. | 3 | * All rights reserved. |
4 | * | 4 | * |
@@ -132,7 +132,8 @@ dir_ctrl(X509_LOOKUP *ctx, int cmd, const char *argp, long argl, | |||
132 | switch (cmd) { | 132 | switch (cmd) { |
133 | case X509_L_ADD_DIR: | 133 | case X509_L_ADD_DIR: |
134 | if (argl == X509_FILETYPE_DEFAULT) { | 134 | if (argl == X509_FILETYPE_DEFAULT) { |
135 | dir = (char *)getenv(X509_get_default_cert_dir_env()); | 135 | if (issetugid() == 0) |
136 | dir = getenv(X509_get_default_cert_dir_env()); | ||
136 | if (dir) | 137 | if (dir) |
137 | ret = add_cert_dir(ld, dir, X509_FILETYPE_PEM); | 138 | ret = add_cert_dir(ld, dir, X509_FILETYPE_PEM); |
138 | else | 139 | else |