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 C371E13877A for ; Wed, 6 Aug 2014 09:06:44 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 6BC75E0809; Wed, 6 Aug 2014 09:06:43 +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 0F19AE0809 for ; Wed, 6 Aug 2014 09:06:42 +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 0C91D3400EF for ; Wed, 6 Aug 2014 09:06:42 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by spoonbill.gentoo.org (Postfix) with ESMTP id CBAF718815 for ; Wed, 6 Aug 2014 09:06:40 +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: <1407315837.da03441669c38c959a7a8657383097fcfabf3fbf.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: da03441669c38c959a7a8657383097fcfabf3fbf X-VCS-Branch: testing Date: Wed, 6 Aug 2014 09:06:40 +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: 4ce6cdf6-83d9-4953-8871-3667d702ff40 X-Archives-Hash: 98b58e5fad8864f4edd83d846292d148 commit: da03441669c38c959a7a8657383097fcfabf3fbf Author: Sven Vermeulen siphos be> AuthorDate: Wed Aug 6 09:03:57 2014 +0000 Commit: Sven Vermeulen gentoo org> CommitDate: Wed Aug 6 09:03:57 2014 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/hardened-refpolicy.git;a=commit;h=da034416 Introduce files_manage_non_security_file_type interface This interface, similar to files_manage_non_auth_files, allows the domain to manage and work on non-security related file types. No type attributes are set so this can be used in a tunable_policy statement if necessary. Naming based on the attribute used (non_security_file_type). --- policy/modules/kernel/files.if | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/policy/modules/kernel/files.if b/policy/modules/kernel/files.if index ca278d5..5d53aa4 100644 --- a/policy/modules/kernel/files.if +++ b/policy/modules/kernel/files.if @@ -6728,3 +6728,27 @@ interface(`files_read_etc_runtime',` read_files_pattern($1, { etc_t etc_runtime_t }, etc_runtime_t) read_lnk_files_pattern($1, { etc_t etc_runtime_t }, etc_runtime_t) ') + +######################################## +## +## Manage non-security related resources. +## +## +## +## Domain allowed access. +## +## +## +# +interface(`files_manage_non_security_file_type',` + gen_require(` + attribute non_security_file_type; + ') + + manage_dirs_pattern($1, non_security_file_type, non_security_file_type) + manage_files_pattern($1, non_security_file_type, non_security_file_type) + manage_lnk_files_pattern($1, non_security_file_type, non_security_file_type) + manage_fifo_files_pattern($1, non_security_file_type, non_security_file_type) + manage_sock_files_pattern($1, non_security_file_type, non_security_file_type) +') +