diff options
author | Richard Levitte <levitte@openssl.org> | 2018-12-20 10:17:38 +0100 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2019-01-16 06:19:17 +0100 |
commit | aefb980c45134d84f1757de1a9c61d699c8a7e33 (patch) | |
tree | fbceafe1e8b953a9baf4155bcdea54e4fc48929d /crypto/uid.c | |
parent | ea09abc80892920ee5db4de82bed7a193b5896f0 (diff) |
crypto/uid.c: use own macro as guard rather than AT_SECURE
It turns out that AT_SECURE may be defined through other means than
our inclusion of sys/auxv.h, so to be on the safe side, we define our
own guard and use that to determine if getauxval() should be used or
not.
Fixes #7932
Reviewed-by: Paul Dale <paul.dale@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/7933)
Diffstat (limited to 'crypto/uid.c')
-rw-r--r-- | crypto/uid.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/crypto/uid.c b/crypto/uid.c index 66356398c2..494dbdeff8 100644 --- a/crypto/uid.c +++ b/crypto/uid.c @@ -34,12 +34,13 @@ int OPENSSL_issetugid(void) # if defined(__GLIBC__) && defined(__GLIBC_PREREQ) # if __GLIBC_PREREQ(2, 16) # include <sys/auxv.h> +# define OSSL_IMPLEMENT_GETAUXVAL # endif # endif int OPENSSL_issetugid(void) { -# ifdef AT_SECURE +# ifdef OSSL_IMPLEMENT_GETAUXVAL return getauxval(AT_SECURE) != 0; # else return getuid() != geteuid() || getgid() != getegid(); |