From patchwork Wed Sep 21 23:59:27 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Roberts, William C" X-Patchwork-Id: 9344413 Return-Path: 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 A083F607D4 for ; Thu, 22 Sep 2016 01:08:33 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 862C92A226 for ; Thu, 22 Sep 2016 01:08:33 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 76A662A22A; Thu, 22 Sep 2016 01:08:33 +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 (emsm-gh1-uea10.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 8CD8A2A226 for ; Thu, 22 Sep 2016 01:08:32 +0000 (UTC) X-IronPort-AV: E=Sophos;i="5.30,376,1470700800"; d="scan'208";a="17842984" IronPort-PHdr: =?us-ascii?q?9a23=3AncBQixTwxlrqsf9VFTBm9HLZ9Npsv+yvbD5Q0YIu?= =?us-ascii?q?jvd0So/mwa65ZReN2/xhgRfzUJnB7Loc0qyN4vqmATdLusfJmUtBWaQEbwUCh8?= =?us-ascii?q?QSkl5oK+++Imq/EsTXaTcnFt9JTl5v8iLzG0FUHMHjew+a+SXqvnYsExnyfTB4?= =?us-ascii?q?Ov7yUtaLyZ/mjabqoNaIMk1hv3mUWftKNhK4rAHc5IE9oLBJDeIP8CbPuWZCYO?= =?us-ascii?q?9MxGlldhq5lhf44dqsrtY4q3wD888784Z8dYmyP+FhFf0LRAghZns44MztqAnr?= =?us-ascii?q?URqE5nxaVH4f1BVPHUyN9xzzWJvrtSr28+58wzWyIdz9TbdyXy+rqahsVlugky?= =?us-ascii?q?scHyIo+2HQzMprheRUpwzl7x5gyIfOfNu9KOt1fqSbe8gTA2VGQJV/TStEV5y9?= =?us-ascii?q?a48OBu9HNqBCqIPwvUcVhRq4GQSoQujoz2wbzkTq1LE3hrxyWTrN2xYtSpdX6H?= =?us-ascii?q?k=3D?= X-IPAS-Result: =?us-ascii?q?A2HwBADPLuNX/wHyM5BeHAEBBAEBCgEBFwEBBAEBCgEBgxA?= =?us-ascii?q?BAQEBAR6BU6Y0jgeGNyOHbUwBAQEBAQEBAQIBAlsngjIEAxMFghgCNxQgDgMJA?= =?us-ascii?q?hcIIQgIAwEtFRgHCwUYBIgqu0UBJIg7hmQCEQGFegWONHeKSo9iAol7hW0CSJA?= =?us-ascii?q?bVIUlUgGEFg8XYYEnAQEB?= Received: from unknown (HELO tarius.tycho.ncsc.mil) ([144.51.242.1]) by emsm-gh1-uea10.nsa.gov with ESMTP; 22 Sep 2016 01:08:00 +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 u8M17AOT027491; Wed, 21 Sep 2016 21:07:19 -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 u8M179cP093620 for ; Wed, 21 Sep 2016 21:07:09 -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 u8M178Sw027475; Wed, 21 Sep 2016 21:07:08 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A1DLBAAqLeNX/yNjr8ZeGwEBAQMBAQEJAQEBgzsBAQEBAR6BU7Q7gi6EExSGCoFoTAECAQEBAQECXoYIMIEPEohLuzcBMIg7hmSGDgWONHeKSo9iAo9oAkiQG1SFJVIBhBaCLgEBAQ X-IPAS-Result: A1DLBAAqLeNX/yNjr8ZeGwEBAQMBAQEJAQEBgzsBAQEBAR6BU7Q7gi6EExSGCoFoTAECAQEBAQECXoYIMIEPEohLuzcBMIg7hmSGDgWONHeKSo9iAo9oAkiQG1SFJVIBhBaCLgEBAQ X-IronPort-AV: E=Sophos;i="5.30,376,1470715200"; d="scan'208";a="5720601" Received: from emsm-gh1-uea11.corp.nsa.gov (HELO emsm-gh1-uea11.nsa.gov) ([10.208.41.37]) by goalie.tycho.ncsc.mil with ESMTP; 21 Sep 2016 21:07:03 -0400 IronPort-PHdr: =?us-ascii?q?9a23=3AtNlk9xWuDbwQdp7J9ehLnmzDIhjV8LGtZVwlr6E/?= =?us-ascii?q?grcLSJyIuqrYZxePt8tkgFKBZ4jH8fUM07OQ6PG6HzRbqs3Q+Fk5M7V0Hycfjs?= =?us-ascii?q?sXmwFySOWkMmbcaMDQUiohAc5ZX0Vk9XzoeWJcGcL5ekGA6ibqtW1aJBzzOEJP?= =?us-ascii?q?K/jvHcaK1oLshrr0o8aYOFQArQH+SIs6FA+xowTVu5teqqpZAYF19CH0pGBVcf?= =?us-ascii?q?9d32JiKAHbtR/94sCt4MwrqHwI6LoJvvRNWqTifqk+UacQTHF/azh0t/vQsgPf?= =?us-ascii?q?QAe163AdSj9e0kYQQluN0BavRZr1sy3npsJhySKaOovwVrlyVjO8q+9wRRbuhD?= =?us-ascii?q?0ANjJ89GDMluRsnalbp1SnvBU5zInKJMmOOOFWYrLWfdRcQ3FIGMlWSWgJAJy3?= =?us-ascii?q?ZpETVcIdLO1YqM/7vFJIohygVie2A+a61T5Mgn7/2Osxlf4mGwzcwBcIHtQSvX?= =?us-ascii?q?CSp9LwZ/Raavy80KSdlWaLVPhRwzqordaQfw=3D=3D?= X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: =?us-ascii?q?A0FhBAASLuNX/yNjr8ZeGwEBAQMBAQEJA?= =?us-ascii?q?QEBFwEBBAEBCgEBgxABAQEBAR6BU6Y0jgeCLoQTFIYKgWhMAQEBAQEBAQECAQJ?= =?us-ascii?q?bJ4IyBAEVBYMQMIEPEohLuzgBCyWIO4Zkhg4FjjR3ikqPYgKPaAJIkBtUhSVSA?= =?us-ascii?q?YQWboFAAQEB?= X-IPAS-Result: =?us-ascii?q?A0FhBAASLuNX/yNjr8ZeGwEBAQMBAQEJAQEBFwEBBAEBCgE?= =?us-ascii?q?BgxABAQEBAR6BU6Y0jgeCLoQTFIYKgWhMAQEBAQEBAQECAQJbJ4IyBAEVBYMQM?= =?us-ascii?q?IEPEohLuzgBCyWIO4Zkhg4FjjR3ikqPYgKPaAJIkBtUhSVSAYQWboFAAQEB?= X-IronPort-AV: E=Sophos;i="5.30,376,1470700800"; d="scan'208";a="19452149" Received: from fmsmga002-icc.fm.intel.com ([198.175.99.35]) by emsm-gh1-uea11.nsa.gov with ESMTP; 22 Sep 2016 01:07:02 +0000 Received: from fmsmga006-icc.fm.intel.com ([198.175.99.5]) by fmsmga002-icc.fm.intel.com with ESMTP; 21 Sep 2016 18:06:53 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.30,375,1470726000"; d="scan'208";a="11848020" Received: from cbwalden-mobl6.amr.corp.intel.com (HELO wcrobert-MOBL1.amr.corp.intel.com) ([10.254.110.244]) by fmsmga006.fm.intel.com with ESMTP; 21 Sep 2016 16:59:35 -0700 From: william.c.roberts@intel.com To: selinux@tycho.nsa.gov, seandroid-list@tycho.nsa.gov, sds@tycho.nsa.gov, jwcart2@tycho.nsa.gov Subject: [PATCH] Fix redefinition of XATTR_NAME_SELINUX Date: Wed, 21 Sep 2016 16:59:27 -0700 Message-Id: <1474502367-6943-1-git-send-email-william.c.roberts@intel.com> X-Mailer: git-send-email 1.9.1 X-BeenThere: selinux@tycho.nsa.gov X-Mailman-Version: 2.1.20 Precedence: list List-Id: "Security-Enhanced Linux \(SELinux\) mailing list" List-Post: List-Help: MIME-Version: 1.0 Errors-To: selinux-bounces@tycho.nsa.gov Sender: "Selinux" X-Virus-Scanned: ClamAV using ClamSMTP From: William Roberts When the Kernel UAPI header is present, this error occurs: external/selinux/libselinux/src/policy.h:7:9: warning: 'XATTR_NAME_SELINUX' macro redefined [-Wmacro-redefined] \#define XATTR_NAME_SELINUX "security.selinux" ^ bionic/libc/kernel/uapi/linux/xattr.h:52:9: note: previous definition is here \#define XATTR_NAME_SELINUX XATTR_SECURITY_PREFIX XATTR_SELINUX_SUFFIX Just use the kernel UAPI version on that case. Change-Id: I1b2d34e463477adaec227ac8c3364f1b9d49e997 Signed-off-by: William Roberts --- libselinux/src/policy.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/libselinux/src/policy.h b/libselinux/src/policy.h index bf270b5..f6d7242 100644 --- a/libselinux/src/policy.h +++ b/libselinux/src/policy.h @@ -3,8 +3,13 @@ /* Private definitions used internally by libselinux. */ -/* xattr name for SELinux attributes. */ +/* + * xattr name for SELinux attributes. + * This may have been exported via Kernel uapi header. + */ +#ifndef XATTR_NAME_SELINUX #define XATTR_NAME_SELINUX "security.selinux" +#endif /* Initial length guess for getting contexts. */ #define INITCONTEXTLEN 255