From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: <gentoo-commits+bounces-719389-garchives=archives.gentoo.org@lists.gentoo.org> Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 8214D1387E8 for <garchives@archives.gentoo.org>; Fri, 8 Aug 2014 08:48:25 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 8DAF3E0946; Fri, 8 Aug 2014 08:48:24 +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 0E7B8E0917 for <gentoo-commits@lists.gentoo.org>; Fri, 8 Aug 2014 08:48:23 +0000 (UTC) Received: from spoonbill.gentoo.org (spoonbill.gentoo.org [81.93.255.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 01EF033F7E9 for <gentoo-commits@lists.gentoo.org>; Fri, 8 Aug 2014 08:48:23 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by spoonbill.gentoo.org (Postfix) with ESMTP id 66F061881B for <gentoo-commits@lists.gentoo.org>; Fri, 8 Aug 2014 08:48:21 +0000 (UTC) From: "Sven Vermeulen" <swift@gentoo.org> 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" <swift@gentoo.org> Message-ID: <1407487587.712145986e7c34ed256362a0a81dfe2a4b50639e.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: 712145986e7c34ed256362a0a81dfe2a4b50639e X-VCS-Branch: master Date: Fri, 8 Aug 2014 08:48:21 +0000 (UTC) Precedence: bulk List-Post: <mailto:gentoo-commits@lists.gentoo.org> List-Help: <mailto:gentoo-commits+help@lists.gentoo.org> List-Unsubscribe: <mailto:gentoo-commits+unsubscribe@lists.gentoo.org> List-Subscribe: <mailto:gentoo-commits+subscribe@lists.gentoo.org> List-Id: Gentoo Linux mail <gentoo-commits.gentoo.org> X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 077e1557-2bd7-4d11-8bd5-8c71d966ed56 X-Archives-Hash: 4c23ab774a867c4ae10b46cf7d5a9fa1 Message-ID: <20140808084821.ny6xCKBscWCigw2gr7c0RiQ9AM-SC0yPvahzBm5mzMY@z> commit: 712145986e7c34ed256362a0a81dfe2a4b50639e Author: Sven Vermeulen <sven.vermeulen <AT> siphos <DOT> be> AuthorDate: Fri Aug 8 08:46:27 2014 +0000 Commit: Sven Vermeulen <swift <AT> gentoo <DOT> org> CommitDate: Fri Aug 8 08:46:27 2014 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/hardened-refpolicy.git;a=commit;h=71214598 Use files_relabel_all_non_security_file_types Use the naming convention "_all_" + <attribute-name> + "s" (plural) --- policy/modules/kernel/files.if | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/policy/modules/kernel/files.if b/policy/modules/kernel/files.if index 33076ed..fd1f8e9 100644 --- a/policy/modules/kernel/files.if +++ b/policy/modules/kernel/files.if @@ -6731,8 +6731,7 @@ interface(`files_read_etc_runtime',` ######################################## ## <summary> -## Relabel all non-security related -## files. +## Allow relabel from and to non-security types ## </summary> ## <param name="domain"> ## <summary> @@ -6741,17 +6740,19 @@ interface(`files_read_etc_runtime',` ## </param> ## <rolecap/> # -interface(`files_relabel_non_security_file_type',` +interface(`files_relabel_all_non_security_file_types',` gen_require(` attribute non_security_file_type; ') allow $1 non_security_file_type:dir list_dir_perms; + relabel_dirs_pattern($1, non_security_file_type, non_security_file_type) relabel_files_pattern($1, non_security_file_type, non_security_file_type) relabel_lnk_files_pattern($1, non_security_file_type, non_security_file_type) relabel_fifo_files_pattern($1, non_security_file_type, non_security_file_type) relabel_sock_files_pattern($1, non_security_file_type, non_security_file_type) + # this is only relabelfrom since there should be no # device nodes with file types. relabelfrom_blk_files_pattern($1, non_security_file_type, non_security_file_type)