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 1F577138010 for ; Sat, 6 Oct 2012 15:57:48 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id C4874E056C; Sat, 6 Oct 2012 15:56:40 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 0FB0AE0529 for ; Sat, 6 Oct 2012 15:56:39 +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 6235033D77F for ; Sat, 6 Oct 2012 15:56:39 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by hornbill.gentoo.org (Postfix) with ESMTP id D2F36E544B for ; Sat, 6 Oct 2012 15:56:36 +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: <1349538777.f1ab4e539476b17c72be5a09cec39ec1b457d894.SwifT@gentoo> Subject: [gentoo-commits] proj/hardened-refpolicy:master commit in: / X-VCS-Repository: proj/hardened-refpolicy X-VCS-Files: mandb.if mandb.te X-VCS-Directories: / X-VCS-Committer: SwifT X-VCS-Committer-Name: Sven Vermeulen X-VCS-Revision: f1ab4e539476b17c72be5a09cec39ec1b457d894 X-VCS-Branch: master Date: Sat, 6 Oct 2012 15:56:36 +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: ad4333ae-418f-46ed-ad19-b83533768a05 X-Archives-Hash: 52162f3ffbe6865527fc4c5b0f50320e commit: f1ab4e539476b17c72be5a09cec39ec1b457d894 Author: Dominick Grift gmail com> AuthorDate: Fri Oct 5 12:42:46 2012 +0000 Commit: Sven Vermeulen siphos be> CommitDate: Sat Oct 6 15:52:57 2012 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/hardened-refpolicy.git;a=commit;h=f1ab4e53 changes to the mandb policy module Add verious interfaces to be used by miscfiles Signed-off-by: Dominick Grift gmail.com> --- mandb.if | 83 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ mandb.te | 2 +- 2 files changed, 84 insertions(+), 1 deletions(-) diff --git a/mandb.if b/mandb.if index 56306c6..35988b0 100644 --- a/mandb.if +++ b/mandb.if @@ -48,6 +48,89 @@ interface(`mandb_run',` ######################################## ## +## Search mandb cache directories. +## +## +## +## Domain allowed access. +## +## +# +interface(`mandb_search_cache',` + gen_require(` + type mandb_cache_t; + ') + + files_search_var($1) + allow $1 mandb_cache_t:dir search_dir_perms; +') + +######################################## +## +## Delete mandb cache content. +## +## +## +## Domain allowed access. +## +## +# +interface(`mandb_delete_cache_content',` + gen_require(` + type mandb_cache_t; + ') + + files_search_var($1) + allow $1 mandb_cache_t:dir delete_dir_perms; + allow $1 mandb_cache_t:file delete_file_perms; + allow $1 mandb_cache_t:lnk_file delete_lnk_file_perms; +') + +######################################## +## +## Read mandb cache content. +## +## +## +## Domain allowed access. +## +## +# +interface(`mandb_read_cache_content',` + gen_require(` + type mandb_cache_t; + ') + + files_search_var($1) + allow $1 mandb_cache_t:dir list_dir_perms; + allow $1 mandb_cache_t:file read_file_perms; + allow $1 mandb_cache_t:lnk_file read_lnk_file_perms; +') + +######################################## +## +## Create, read, write, and delete +## mandb cache files. +## +## +## +## Domain allowed access. +## +## +# +interface(`mandb_manage_cache_content',` + gen_require(` + type mandb_cache_t; + ') + + files_search_var($1) + allow $1 mandb_cache_t:dir manage_dir_perms; + allow $1 mandb_cache_t:file manage_file_perms; + allow $1 mandb_cache_t:lnk_file manage_lnk_file_perms; +') + +######################################## +## ## All of the rules required to ## administrate an mandb environment. ## diff --git a/mandb.te b/mandb.te index 3009005..8db8613 100644 --- a/mandb.te +++ b/mandb.te @@ -1,4 +1,4 @@ -policy_module(mandb, 1.0.0) +policy_module(mandb, 1.0.1) ######################################## #