diff options
| author | deraadt <> | 2014-06-23 22:19:02 +0000 |
|---|---|---|
| committer | deraadt <> | 2014-06-23 22:19:02 +0000 |
| commit | 5ba01919626638d95dda5319c6aa4e793eedfd20 (patch) | |
| tree | 0758b2ca73b32d860fcfea38d70af1cafc23acf9 /src/lib/libcrypto/engine | |
| parent | 4812402a872d310cb68bab6e694bed7cc50c40eb (diff) | |
| download | openbsd-5ba01919626638d95dda5319c6aa4e793eedfd20.tar.gz openbsd-5ba01919626638d95dda5319c6aa4e793eedfd20.tar.bz2 openbsd-5ba01919626638d95dda5319c6aa4e793eedfd20.zip | |
Since this is a library, place issetugid() before every getenv()
ok miod
Diffstat (limited to 'src/lib/libcrypto/engine')
| -rw-r--r-- | src/lib/libcrypto/engine/eng_list.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/lib/libcrypto/engine/eng_list.c b/src/lib/libcrypto/engine/eng_list.c index 053767c646..22e2abb01d 100644 --- a/src/lib/libcrypto/engine/eng_list.c +++ b/src/lib/libcrypto/engine/eng_list.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: eng_list.c,v 1.10 2014/06/22 12:15:53 jsing Exp $ */ | 1 | /* $OpenBSD: eng_list.c,v 1.11 2014/06/23 22:19:02 deraadt Exp $ */ |
| 2 | /* Written by Geoff Thorpe (geoff@geoffthorpe.net) for the OpenSSL | 2 | /* Written by Geoff Thorpe (geoff@geoffthorpe.net) for the OpenSSL |
| 3 | * project 2000. | 3 | * project 2000. |
| 4 | */ | 4 | */ |
| @@ -385,7 +385,8 @@ ENGINE_by_id(const char *id) | |||
| 385 | return iterator; | 385 | return iterator; |
| 386 | /* Prevent infinite recusrion if we're looking for the dynamic engine. */ | 386 | /* Prevent infinite recusrion if we're looking for the dynamic engine. */ |
| 387 | if (strcmp(id, "dynamic")) { | 387 | if (strcmp(id, "dynamic")) { |
| 388 | if ((load_dir = getenv("OPENSSL_ENGINES")) == 0) | 388 | if (issetugid() == 0 || |
| 389 | (load_dir = getenv("OPENSSL_ENGINES")) == 0) | ||
| 389 | load_dir = ENGINESDIR; | 390 | load_dir = ENGINESDIR; |
| 390 | iterator = ENGINE_by_id("dynamic"); | 391 | iterator = ENGINE_by_id("dynamic"); |
| 391 | if (!iterator || | 392 | if (!iterator || |
