From patchwork Mon Jul 3 13:42:07 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom de Vries X-Patchwork-Id: 783494 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3x1SxX1Qjxz9s74 for ; Mon, 3 Jul 2017 23:42:40 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="pFtBtOpo"; dkim-atps=neutral DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :subject:to:cc:references:from:message-id:date:mime-version :in-reply-to:content-type; q=dns; s=default; b=aIKS+Iff227yF52bn 7wzKqyv6mBMk6ClVyQuHppZYdjKNa3VtDsyQYOmXQ3U0tRy1cwlS8Ll+3HYOjT5M CfNWA69mf3+5XHYWNWVUQqCyHycLJNQpgL7kEVNqvBAB/lbAkJg1pHLRcC/n22+P BRHKEyrcOPKECsHRkWIxtb4m54= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :subject:to:cc:references:from:message-id:date:mime-version :in-reply-to:content-type; s=default; bh=IfOBkN3blulnAS5tgQ7nCAM 4Pfo=; b=pFtBtOpoA/aw6oVh+0UNGVOpkGea/mLmJiD4n+YlEVg2XGzWdOLq88M UxUrSmdzgr6CHcw8ls1GJe+ZkyEYmUJnBNZEuQdRuCtoBvu1NJu1aeRzMONhpn3G 4bvfpGMTDk1aW6/eB/r1Pwy0nVib0cb3F5xCpO3vzog/EYNLmjCM= Received: (qmail 97671 invoked by alias); 3 Jul 2017 13:42:27 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 97309 invoked by uid 89); 3 Jul 2017 13:42:26 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-24.5 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_PASS, URIBL_RED autolearn=ham version=3.3.2 spammy=utilized X-HELO: relay1.mentorg.com Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 03 Jul 2017 13:42:20 +0000 Received: from nat-ies.mentorg.com ([192.94.31.2] helo=SVR-IES-MBX-04.mgc.mentorg.com) by relay1.mentorg.com with esmtp id 1dS1cG-0006C5-Nc from Tom_deVries@mentor.com ; Mon, 03 Jul 2017 06:42:16 -0700 Received: from [127.0.0.1] (137.202.0.87) by SVR-IES-MBX-04.mgc.mentorg.com (139.181.222.4) with Microsoft SMTP Server (TLS) id 15.0.1263.5; Mon, 3 Jul 2017 14:42:11 +0100 Subject: Re: [PATCH] Use secure_getenv for GOMP_DEBUG To: Franz Sirl CC: Jakub Jelinek , 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> <1fbc8af9-e152-0315-3074-5c4839fd3c1b@lauterbach.com> From: Tom de Vries Message-ID: <7e17de73-a785-9b63-cb5d-8cb68610ec4e@mentor.com> Date: Mon, 3 Jul 2017 15:42:07 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.1.1 MIME-Version: 1.0 In-Reply-To: <1fbc8af9-e152-0315-3074-5c4839fd3c1b@lauterbach.com> X-ClientProxiedBy: svr-ies-mbx-01.mgc.mentorg.com (139.181.222.1) To SVR-IES-MBX-04.mgc.mentorg.com (139.181.222.4) On 07/03/2017 02:26 PM, Franz Sirl wrote: > 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). Hi Franz, sorry for the breakage. Fixed in attached patch. Committed. Thanks, - Tom Fix secure_getenv.h include in plugin-hsa.c 2017-07-03 Tom de Vries * plugin/plugin-hsa.c: Fix secure_getenv.h include. --- libgomp/plugin/plugin-hsa.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libgomp/plugin/plugin-hsa.c b/libgomp/plugin/plugin-hsa.c index adb07ac..fc08f5d 100644 --- a/libgomp/plugin/plugin-hsa.c +++ b/libgomp/plugin/plugin-hsa.c @@ -39,7 +39,7 @@ #include #include "libgomp-plugin.h" #include "gomp-constants.h" -#include "secure-getenv.h" +#include "secure_getenv.h" /* As an HSA runtime is dlopened, following structure defines function pointers utilized by the HSA plug-in. */