From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 7F6D7139695 for ; Tue, 13 Jun 2017 08:25:44 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 450EE21C012; Tue, 13 Jun 2017 08:25:42 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 26C77E0CBD for ; Tue, 13 Jun 2017 08:25:41 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id CDF703418D5 for ; Tue, 13 Jun 2017 08:25:40 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id D0DE87481 for ; Tue, 13 Jun 2017 08:25:38 +0000 (UTC) From: "Jason Zaman" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Jason Zaman" Message-ID: <1497340935.0f2822b1a99d11618c35b0b878b24cce28a8e461.perfinion@gentoo> Subject: [gentoo-commits] proj/hardened-refpolicy:master commit in: policy/modules/system/ X-VCS-Repository: proj/hardened-refpolicy X-VCS-Files: policy/modules/system/miscfiles.fc X-VCS-Directories: policy/modules/system/ X-VCS-Committer: perfinion X-VCS-Committer-Name: Jason Zaman X-VCS-Revision: 0f2822b1a99d11618c35b0b878b24cce28a8e461 X-VCS-Branch: master Date: Tue, 13 Jun 2017 08:25:38 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: d272f668-6990-43cc-bf3c-7dcfeec3def4 X-Archives-Hash: 87709f597dd7ac495064b0193a39cfc9 commit: 0f2822b1a99d11618c35b0b878b24cce28a8e461 Author: Luis Ressel aixah de> AuthorDate: Wed Jun 7 12:38:59 2017 +0000 Commit: Jason Zaman gentoo org> CommitDate: Tue Jun 13 08:02:15 2017 +0000 URL: https://gitweb.gentoo.org/proj/hardened-refpolicy.git/commit/?id=0f2822b1 system/miscfiles: Generalize the man_t fc's This won't match subdirectories of /usr/lib, but that shouldn't be a problem, since we have "allow domain lib_t ..." anyway. We can't match on "/usr/(.*/)?man(/.*)?", since that'd result in a few false positives; in particular, the files /usr/share/xmlto/format/docbook/man /usr/share/bash-completion/completions/man policy/modules/system/miscfiles.fc | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/policy/modules/system/miscfiles.fc b/policy/modules/system/miscfiles.fc index 42ac30bd..88eceb99 100644 --- a/policy/modules/system/miscfiles.fc +++ b/policy/modules/system/miscfiles.fc @@ -39,26 +39,23 @@ ifdef(`distro_redhat',` # # /usr # +/usr/(.*/)?man -d gen_context(system_u:object_r:man_t,s0) +/usr/(.*/)?man/.* gen_context(system_u:object_r:man_t,s0) + /usr/lib/locale(/.*)? gen_context(system_u:object_r:locale_t,s0) /usr/lib/perl5/man(/.*)? gen_context(system_u:object_r:man_t,s0) /usr/local/share/ca-certificates(/.*)? gen_context(system_u:object_r:cert_t,s0) -/usr/local/man(/.*)? gen_context(system_u:object_r:man_t,s0) -/usr/local/share/man(/.*)? gen_context(system_u:object_r:man_t,s0) - /usr/local/share/fonts(/.*)? gen_context(system_u:object_r:man_t,s0) -/usr/man(/.*)? gen_context(system_u:object_r:man_t,s0) - +/usr/share/docbook2X/xslt/man(/.*)? gen_context(system_u:object_r:usr_t,s0) /usr/share/ca-certificates(/.*)? gen_context(system_u:object_r:cert_t,s0) /usr/share/fonts(/.*)? gen_context(system_u:object_r:fonts_t,s0) /usr/share/X11/fonts(/.*)? gen_context(system_u:object_r:fonts_t,s0) /usr/share/ghostscript/fonts(/.*)? gen_context(system_u:object_r:fonts_t,s0) /usr/share/locale(/.*)? gen_context(system_u:object_r:locale_t,s0) -/usr/share/man(/.*)? gen_context(system_u:object_r:man_t,s0) -/usr/share/postgresql/[^/]*/man(/.*)? gen_context(system_u:object_r:man_t,s0) /usr/share/X11/locale(/.*)? gen_context(system_u:object_r:locale_t,s0) /usr/share/zoneinfo(/.*)? gen_context(system_u:object_r:locale_t,s0) @@ -67,8 +64,6 @@ ifdef(`distro_redhat',` /usr/X11R6/lib/X11/fonts(/.*)? gen_context(system_u:object_r:fonts_t,s0) -/usr/X11R6/man(/.*)? gen_context(system_u:object_r:man_t,s0) - ifdef(`distro_gentoo',` /usr/share/misc/(pci|usb)\.ids -- gen_context(system_u:object_r:hwdata_t,s0) ')