[prev in list] [next in list] [prev in thread] [next in thread]
List: gcc-patches
Subject: Re: [PATCH] Use secure_getenv for GOMP_DEBUG
From: Franz Sirl <Franz.Sirl-kernel () lauterbach ! com>
Date: 2017-07-03 12:26:43
Message-ID: 1fbc8af9-e152-0315-3074-5c4839fd3c1b () lauterbach ! com
[Download RAW message or body]
Am 27.06.17 um 13:10 schrieb Tom de Vries:
> --- a/libgomp/plugin/plugin-hsa.c
> +++ b/libgomp/plugin/plugin-hsa.c
> @@ -39,32 +39,7 @@
> #include <dlfcn.h>
> #include "libgomp-plugin.h"
> #include "gomp-constants.h"
> -
> -/* Secure getenv() which returns NULL if running as SUID/SGID. */
> -#ifndef HAVE_SECURE_GETENV
> -#ifdef HAVE___SECURE_GETENV
> -#define secure_getenv __secure_getenv
> -#elif defined (HAVE_UNISTD_H) && defined(HAVE_GETUID) && defined(HAVE_GETEUID) \
> - && defined(HAVE_GETGID) && defined(HAVE_GETEGID)
> -
> -#include <unistd.h>
> -
> -/* Implementation of secure_getenv() for targets where it is not provided but
> - we have at least means to test real and effective IDs. */
> -
> -static char *
> -secure_getenv (const char *name)
> -{
> - if ((getuid () == geteuid ()) && (getgid () == getegid ()))
> - return getenv (name);
> - else
> - return NULL;
> -}
> -
> -#else
> -#define secure_getenv getenv
> -#endif
> -#endif
> +#include "secure-getenv.h"
Hi,
that should be secure_getenv.h (underscore instead of dash).
Franz
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic