From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5040 invoked by alias); 3 Jul 2017 12:26:55 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 4776 invoked by uid 89); 3 Jul 2017 12:26:49 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-11.0 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_2,GIT_PATCH_3,RCVD_IN_DNSWL_NONE,RP_MATCHES_RCVD,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.2 spammy=H*r:qmail-ldap-1.03, H*UA:54.0, schrieb, Hx-languages-length:1101 X-HELO: smtp1.lauterbach.com Received: from smtp1.lauterbach.com (HELO smtp1.lauterbach.com) (62.154.241.196) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 03 Jul 2017 12:26:47 +0000 Received: (qmail 29091 invoked by uid 484); 3 Jul 2017 12:26:44 -0000 X-Qmail-Scanner-Diagnostics: from 10.2.11.10 by smtp1.lauterbach.com (envelope-from , uid 484) with qmail-scanner-2.11 (mhr: 1.0. clamdscan: 0.99/21437. spamassassin: 3.4.0. Clear:RC:1(10.2.11.10):. Processed in 0.047726 secs); 03 Jul 2017 12:26:44 -0000 Received: from unknown (HELO [10.2.11.10]) (Authenticated_SSL:fsirl@[10.2.11.10]) (envelope-sender ) by smtp1.lauterbach.com (qmail-ldap-1.03) with ECDHE-RSA-AES256-GCM-SHA384 encrypted SMTP for ; 3 Jul 2017 12:26:43 -0000 Subject: Re: [PATCH] Use secure_getenv for GOMP_DEBUG To: Tom de Vries , Jakub Jelinek Cc: Joseph Myers , GCC Patches , Thomas Schwinge References: <2413b0f6-9cb2-243f-d805-08323a9c9a0a@mentor.com> <1de94c83-96da-f380-9964-1472f63270c9@mentor.com> <20170626152911.GK2123@tucnak> <9110a6a9-43dc-52ca-aabf-20c73ac73775@mentor.com> <20170627073805.GP2123@tucnak> <46104e74-3bac-13b1-54ca-025eb5c48920@mentor.com> From: Franz Sirl Message-ID: <1fbc8af9-e152-0315-3074-5c4839fd3c1b@lauterbach.com> Date: Mon, 03 Jul 2017 12:26:00 -0000 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:54.0) Gecko/20100101 Thunderbird/54.0 MIME-Version: 1.0 In-Reply-To: <46104e74-3bac-13b1-54ca-025eb5c48920@mentor.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2017-07/txt/msg00092.txt.bz2 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 > #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 > - > -/* 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