From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 350AD58973 for ; Sun, 31 Jan 2016 16:19:43 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 8C28121C05E; Sun, 31 Jan 2016 16:19:42 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 3AC0A21C05E for ; Sun, 31 Jan 2016 16:19:42 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id E0DE2340ABF for ; Sun, 31 Jan 2016 16:19:40 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id DDC9C8E5 for ; Sun, 31 Jan 2016 16:19:37 +0000 (UTC) From: "Sven Vermeulen" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sven Vermeulen" Message-ID: <1454257164.aea1a2c1e811cffff5f00eaff151aa39d275dc91.swift@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/selinuxutil.if X-VCS-Directories: policy/modules/system/ X-VCS-Committer: swift X-VCS-Committer-Name: Sven Vermeulen X-VCS-Revision: aea1a2c1e811cffff5f00eaff151aa39d275dc91 X-VCS-Branch: master Date: Sun, 31 Jan 2016 16:19:37 +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: 4611ef75-eb73-4f42-8632-ac3e38d91670 X-Archives-Hash: 3b7e7c9114431906433730ac52e131e9 commit: aea1a2c1e811cffff5f00eaff151aa39d275dc91 Author: Sven Vermeulen gentoo org> AuthorDate: Sun Jan 31 16:19:24 2016 +0000 Commit: Sven Vermeulen gentoo org> CommitDate: Sun Jan 31 16:19:24 2016 +0000 URL: https://gitweb.gentoo.org/proj/hardened-refpolicy.git/commit/?id=aea1a2c1 Allow sesearch to find default policy Utilities that want to find the default policy in /etc/selinux/*/policy will need read privileges on policy_config_t as they list the contents of the policy/ folder. Example is the sesearch command. policy/modules/system/selinuxutil.if | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/policy/modules/system/selinuxutil.if b/policy/modules/system/selinuxutil.if index 55d2429..b4c70a3 100644 --- a/policy/modules/system/selinuxutil.if +++ b/policy/modules/system/selinuxutil.if @@ -941,6 +941,12 @@ interface(`seutil_read_bin_policy',` files_search_etc($1) allow $1 selinux_config_t:dir search_dir_perms; read_files_pattern($1, policy_config_t, policy_config_t) + + ifdef(`distro_gentoo',` + # Allow sesearch to read /etc/selinux/.../policy + # Otherwise it returns "No default policy found" + allow $1 policy_config_t:dir list_dir_perms; + ') ') ########################################