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 9C07B1381F3 for ; Thu, 15 Aug 2013 17:23:18 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 58E83E0C39; Thu, 15 Aug 2013 17:23:16 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id B56BFE0C39 for ; Thu, 15 Aug 2013 17:23:15 +0000 (UTC) Received: from hornbill.gentoo.org (hornbill.gentoo.org [94.100.119.163]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 56C6233EC69 for ; Thu, 15 Aug 2013 17:23:14 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by hornbill.gentoo.org (Postfix) with ESMTP id DA6D0E468F for ; Thu, 15 Aug 2013 17:23:12 +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: <1376586652.023490ef698dfe40bf7e3dbecca785ffa43f11f2.SwifT@gentoo> Subject: [gentoo-commits] proj/hardened-refpolicy:master commit in: policy/modules/kernel/ X-VCS-Repository: proj/hardened-refpolicy X-VCS-Files: policy/modules/kernel/files.if X-VCS-Directories: policy/modules/kernel/ X-VCS-Committer: SwifT X-VCS-Committer-Name: Sven Vermeulen X-VCS-Revision: 023490ef698dfe40bf7e3dbecca785ffa43f11f2 X-VCS-Branch: master Date: Thu, 15 Aug 2013 17:23:12 +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: 1570e9a4-9211-48be-adfb-621fe6b5c99b X-Archives-Hash: e0c25058049f586505822a01ec4dbc70 commit: 023490ef698dfe40bf7e3dbecca785ffa43f11f2 Author: Sven Vermeulen siphos be> AuthorDate: Thu Aug 15 17:10:52 2013 +0000 Commit: Sven Vermeulen siphos be> CommitDate: Thu Aug 15 17:10:52 2013 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/hardened-refpolicy.git;a=commit;h=023490ef Adding files_read_src_files In order for the depmod command (now linked with kmod and thus running in insmod_t) to handle System.map file (and other files residing in /usr/src and needed during the "make modules_install" phase of a kernel build) we need it to grant read rights to src_t. Start with defining the interface. See also bug #428322 --- policy/modules/kernel/files.if | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/policy/modules/kernel/files.if b/policy/modules/kernel/files.if index a8663b5..a544f27 100644 --- a/policy/modules/kernel/files.if +++ b/policy/modules/kernel/files.if @@ -6641,3 +6641,23 @@ interface(`files_unconfined',` typeattribute $1 files_unconfined_type; ') + +# should be in an ifdef distro_gentoo but cannot do so for interfaces + +######################################### +## +## Read usr/src files +## +## +## +## Domain allowed access +## +## +# +interface(`files_read_src_files',` + gen_require(` + type src_t; + ') + + read_files_pattern($1, src_t, src_t) +')