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 55D801393DD for ; Fri, 8 Aug 2014 08:50:51 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 3018EE0963; Fri, 8 Aug 2014 08:50:49 +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 8AD04E0961 for ; Fri, 8 Aug 2014 08:50:48 +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 6AA7833FFEE for ; Fri, 8 Aug 2014 08:50:47 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by spoonbill.gentoo.org (Postfix) with ESMTP id 2527A18810 for ; Fri, 8 Aug 2014 08:50:46 +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: <1407404377.efbdcdbe1e713bdf62e3ad054d0b950e29b6b605.swift@gentoo> Subject: [gentoo-commits] proj/hardened-refpolicy:testing 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: efbdcdbe1e713bdf62e3ad054d0b950e29b6b605 X-VCS-Branch: testing Date: Fri, 8 Aug 2014 08:50:46 +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: abc19bf6-7333-4398-9023-da905132d9b7 X-Archives-Hash: 01381c8c448ff86e1533a8a46bf558cf Message-ID: <20140808085046.DOtNRECmyjjixJjA6W-Bc8rw_u0VgoHDvJc_YIau-ZQ@z> commit: efbdcdbe1e713bdf62e3ad054d0b950e29b6b605 Author: Sven Vermeulen siphos be> AuthorDate: Thu Aug 7 09:39:37 2014 +0000 Commit: Sven Vermeulen gentoo org> CommitDate: Thu Aug 7 09:39:37 2014 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/hardened-refpolicy.git;a=commit;h=efbdcdbe Add files_relabel_non_security_file_type This interface allows for relabel operations against all resources with a type associated with the non_security_file_type attribute. --- policy/modules/kernel/files.if | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/policy/modules/kernel/files.if b/policy/modules/kernel/files.if index 5d53aa4..105c7c2 100644 --- a/policy/modules/kernel/files.if +++ b/policy/modules/kernel/files.if @@ -6731,6 +6731,35 @@ interface(`files_read_etc_runtime',` ######################################## ## +## Relabel all non-security related +## files. +## +## +## +## Domain allowed access. +## +## +## +# +interface(`files_relabel_non_security_file_type',` + 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) + relabelfrom_chr_files_pattern($1, non_security_file_type, non_security_file_type) +') + +######################################## +## ## Manage non-security related resources. ## ##