Message ID | 147137830278.28034.16028483708824878946.stgit@localhost (mailing list archive) |
---|---|
State | Accepted |
Headers | show
Return-Path: <selinux-bounces@tycho.nsa.gov> Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 45A4C60839 for <patchwork-selinux@patchwork.kernel.org>; Tue, 16 Aug 2016 20:12:58 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 322C228772 for <patchwork-selinux@patchwork.kernel.org>; Tue, 16 Aug 2016 20:12:58 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2504A2877F; Tue, 16 Aug 2016 20:12:58 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=2.0 tests=BAYES_00 autolearn=ham version=3.3.1 Received: from emsm-gh1-uea10.nsa.gov (smtp.nsa.gov [8.44.101.8]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 8F9DF28772 for <patchwork-selinux@patchwork.kernel.org>; Tue, 16 Aug 2016 20:12:57 +0000 (UTC) X-IronPort-AV: E=Sophos;i="5.28,529,1464652800"; d="scan'208";a="16656308" IronPort-PHdr: =?us-ascii?q?9a23=3AunTrchAm89nG6AM13IN9UyQJP3N1i/DPJgcQr6Af?= =?us-ascii?q?oPdwSP78p8bcNUDSrc9gkEXOFd2CrakV0qyP7Ou5BTZIoc7Y9itTKNoUD15NoP?= =?us-ascii?q?5VtjRoONSCB0z/IayiRA0BN+MGamVY+WqmO1NeAsf0ag6aiHSz6TkPBke3blIt?= =?us-ascii?q?dazLE4Lfx/66y/q1s8WKJV4Z3XzkPvgrcE/+7V2I8JJH2c06cud54yCKi0MAQ/?= =?us-ascii?q?5Ry2JsKADbtDfHzeD0wqRe9T9Nsekq7c9KXPayVa05SbtFEGZuaDhtt4XWrx2L?= =?us-ascii?q?cS+jrjtZCz1XwVJ0BF3e4RX7WIrhmjfrvep6ni+BNIv5Sq5ndy6l6vJTQQLswA?= =?us-ascii?q?IAMCQ0uDXPj8t3lq9zuh+tpxVjhYXTZdfGZ7JFYqrBcIZCFiJ6VcFLWnkEW9ux?= X-IPAS-Result: =?us-ascii?q?A2GTHAArc7NX/wHyM5BdGwEBAYMlgVKKMJsJlgMjhX8DgV5?= =?us-ascii?q?MAQEBAQEBAQIBAlsngjIEAxGCHAI3FCAOAwkCFykICAMBLRUfCwUYBIgQvnglh?= =?us-ascii?q?iqCAIZfEQFohQ8FmUGYbxeFVgJIj2hUghIcgWhShSuBNgEBAQ?= Received: from unknown (HELO tarius.tycho.ncsc.mil) ([144.51.242.1]) by emsm-gh1-uea10.nsa.gov with ESMTP; 16 Aug 2016 20:12:55 +0000 Received: from prometheus.infosec.tycho.ncsc.mil (prometheus [192.168.25.40]) by tarius.tycho.ncsc.mil (8.14.4/8.14.4) with ESMTP id u7GKC7Pq027004; Tue, 16 Aug 2016 16:12:17 -0400 Received: from tarius.tycho.ncsc.mil (tarius.infosec.tycho.ncsc.mil [144.51.242.1]) by prometheus.infosec.tycho.ncsc.mil (8.15.2/8.15.2) with ESMTP id u7GKC4jQ247882 for <selinux@prometheus.infosec.tycho.ncsc.mil>; Tue, 16 Aug 2016 16:12:04 -0400 Received: from goalie.tycho.ncsc.mil (goalie [144.51.242.250]) by tarius.tycho.ncsc.mil (8.14.4/8.14.4) with ESMTP id u7GKC4ng027000 for <selinux@tycho.nsa.gov>; Tue, 16 Aug 2016 16:12:04 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A1DrBACvcrNXhhy3hNFdGwEBAYR3ijCbCWSRHYQMFIdlTAEBAQEBAQECEwEBAQgLCwkZhTeBCwImAkkpiDGeXI9lkFqBAYUpggCHWYI1gloFmUGYb4VtAkiPaIIVDEURC4FoIDKGYQEBAQ X-IPAS-Result: A1DrBACvcrNXhhy3hNFdGwEBAYR3ijCbCWSRHYQMFIdlTAEBAQEBAQECEwEBAQgLCwkZhTeBCwImAkkpiDGeXI9lkFqBAYUpggCHWYI1gloFmUGYb4VtAkiPaIIVDEURC4FoIDKGYQEBAQ X-IronPort-AV: E=Sophos;i="5.28,529,1464667200"; d="scan'208";a="5648572" Received: from emsm-gh1-uea10.corp.nsa.gov (HELO emsm-gh1-uea10.nsa.gov) ([10.208.41.36]) by goalie.tycho.ncsc.mil with ESMTP; 16 Aug 2016 16:12:03 -0400 IronPort-PHdr: =?us-ascii?q?9a23=3Ad3A50BNGLOfhAvFxgqsl6mtUPXoX/o7sNwtQ0KIM?= =?us-ascii?q?zox0KPn+rarrMEGX3/hxlliBBdydsKMdzbOJ+Pm8AyRAuc/H6yFaNsQUFlcsso?= =?us-ascii?q?Y/p0QYGsmLCEn2frbBThcRO4B8bmJj5GyxKkNPGczzNBX4q3y26iMOSF2kbVIm?= =?us-ascii?q?btr8FoOatcmrzef6o8SVOFQRwmPiKuoudl329VyX7ZhOx9M6a+4Y8VjgmjNwYe?= =?us-ascii?q?NYxGdldxq4vi3XwYOOxqNl6DlaoPk79sRNAu3QdqU8SqFEXnx9azhmrJ6jiR6W?= =?us-ascii?q?VgaL530BQk0KgxFIBE7D9xi8UZDv4QXgse8o4CCHOYXTSrcuVHz296JsTwXloD?= =?us-ascii?q?0KOz4w7Cfcjckm3/ETmw6ouxEqm92cW4qSLvcrJq4=3D?= X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: =?us-ascii?q?A0FfCQArc7NXhhy3hNFdHAEBhHeKMJsJZ?= =?us-ascii?q?JEdhAwUh2VMAQEBAQEBAQIBAhABAQEICwsJGS+CMhaCQIELAiYCSSmIMZ5ej2W?= =?us-ascii?q?QWoEBhSmCAIdZgjWCWgWZQZhvhW0CSI9ogiFFEQuBaCAyhmEBAQE?= X-IPAS-Result: =?us-ascii?q?A0FfCQArc7NXhhy3hNFdHAEBhHeKMJsJZJEdhAwUh2VMAQE?= =?us-ascii?q?BAQEBAQIBAhABAQEICwsJGS+CMhaCQIELAiYCSSmIMZ5ej2WQWoEBhSmCAIdZg?= =?us-ascii?q?jWCWgWZQZhvhW0CSI9ogiFFEQuBaCAyhmEBAQE?= X-IronPort-AV: E=Sophos;i="5.28,529,1464652800"; d="scan'208";a="16656275" Received: from mx1.redhat.com ([209.132.183.28]) by emsm-gh1-uea10.nsa.gov with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 16 Aug 2016 20:11:44 +0000 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 03ED1C0B7737 for <selinux@tycho.nsa.gov>; Tue, 16 Aug 2016 20:11:44 +0000 (UTC) Received: from [127.0.0.1] (vpn-59-69.rdu2.redhat.com [10.10.59.69]) by int-mx14.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u7GKBhQY017963; Tue, 16 Aug 2016 16:11:43 -0400 Subject: [PATCH] selinux-testsuite: fix cap_userns compiler warnings From: Paul Moore <pmoore@redhat.com> To: selinux@tycho.nsa.gov Date: Tue, 16 Aug 2016 16:11:42 -0400 Message-ID: <147137830278.28034.16028483708824878946.stgit@localhost> User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.68 on 10.5.11.27 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Tue, 16 Aug 2016 20:11:44 +0000 (UTC) X-BeenThere: selinux@tycho.nsa.gov X-Mailman-Version: 2.1.20 Precedence: list List-Id: "Security-Enhanced Linux \(SELinux\) mailing list" <selinux.tycho.nsa.gov> List-Post: <mailto:selinux@tycho.nsa.gov> List-Help: <mailto:selinux-request@tycho.nsa.gov?subject=help> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: selinux-bounces@tycho.nsa.gov Sender: "Selinux" <selinux-bounces@tycho.nsa.gov> X-Virus-Scanned: ClamAV using ClamSMTP |
diff --git a/tests/cap_userns/userns_child_exec.c b/tests/cap_userns/userns_child_exec.c index 26ea357..e31bf71 100644 --- a/tests/cap_userns/userns_child_exec.c +++ b/tests/cap_userns/userns_child_exec.c @@ -8,7 +8,11 @@ namespace(s); allow UID and GID mappings to be specified when creating a user namespace. */ + +#ifndef _GNU_SOURCE #define _GNU_SOURCE +#endif + #include <sched.h> #include <unistd.h> #include <stdlib.h>
The top-level Makefile defines _GNU_SOURCE by default which causes the following build warning: cc -g -O0 -Wall -D_GNU_SOURCE userns_child_exec.c -o userns_child_exec userns_child_exec.c:11:0: warning: "_GNU_SOURCE" redefined #define _GNU_SOURCE ... this patch first checks to see if _GNU_SOURCE is defined before defining it again. We're doing it this way, instead of removing it entirely so that the test will still work outside the testsuite. Signed-off-by: Paul Moore <paul@paul-moore.com> --- tests/cap_userns/userns_child_exec.c | 4 ++++ 1 file changed, 4 insertions(+)