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 74CF613877A for ; Thu, 7 Aug 2014 12:41:54 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 3CB31E0897; Thu, 7 Aug 2014 12:41:53 +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 A50EAE0886 for ; Thu, 7 Aug 2014 12:41:52 +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 68DE034022C for ; Thu, 7 Aug 2014 12:41:51 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by spoonbill.gentoo.org (Postfix) with ESMTP id 211E218810 for ; Thu, 7 Aug 2014 12:41:50 +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: <1407404865.9c22729b7ff8064c52b59c5dbe78dfd632a1bf87.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: 9c22729b7ff8064c52b59c5dbe78dfd632a1bf87 X-VCS-Branch: testing Date: Thu, 7 Aug 2014 12:41:50 +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: b862d46c-508b-4d41-ad79-c32003149591 X-Archives-Hash: c202d003c38c303eb18efe39c2d0c3ae commit: 9c22729b7ff8064c52b59c5dbe78dfd632a1bf87 Author: Sven Vermeulen siphos be> AuthorDate: Thu Aug 7 09:39:37 2014 +0000 Commit: Sven Vermeulen gentoo org> CommitDate: Thu Aug 7 09:47:45 2014 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/hardened-refpolicy.git;a=commit;h=9c22729b 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. ## ##