Only use environment variables if uid and gid are the same as euid and egid.
authorRichard Levitte <levitte@openssl.org>
Sat, 27 Dec 2003 16:07:20 +0000 (16:07 +0000)
committerRichard Levitte <levitte@openssl.org>
Sat, 27 Dec 2003 16:07:20 +0000 (16:07 +0000)
This is part of a large change submitted by Markus Friedl <markus@openbsd.org>

crypto/threads/mttest.c

index d0e088218b0ab59522bd08e14bf3876a0e2f5f71..f6f3df4b6aa89c79cabeb9eaa80c51e6f263a64f 100644 (file)
@@ -267,7 +267,8 @@ bad:
                goto end;
                }
 
-       if (cipher == NULL) cipher=getenv("SSL_CIPHER");
+       if (cipher == NULL && OPENSSL_issetugid() == 0)
+               cipher=getenv("SSL_CIPHER");
 
        SSL_load_error_strings();
        OpenSSL_add_ssl_algorithms();