From: jason@perfinion.com (Jason Zaman) Date: Fri, 8 Jun 2018 17:53:40 +0800 Subject: [refpolicy] [PATCH 4/5] portage: Introduce portage_manage_tmp interface In-Reply-To: <20180608095341.20837-1-jason@perfinion.com> References: <20180608095341.20837-1-jason@perfinion.com> Message-ID: <20180608095341.20837-4-jason@perfinion.com> To: refpolicy@oss.tresys.com List-Id: refpolicy.oss.tresys.com --- portage.if | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/portage.if b/portage.if index c0c7e9b..69ec4eb 100644 --- a/portage.if +++ b/portage.if @@ -322,6 +322,29 @@ interface(`portage_dontaudit_use_fds',` dontaudit $1 portage_t:fd use; ') +######################################## +## +## Manage portage tmp content +## +## +## +## Domain allowed access. +## +## +# +interface(`portage_manage_tmp',` + gen_require(` + type portage_tmp_t; + ') + + allow $1 portage_tmp_t:dir manage_dir_perms; + allow $1 portage_tmp_t:file manage_file_perms; + allow $1 portage_tmp_t:lnk_file manage_lnk_file_perms; + allow $1 portage_tmp_t:fifo_file manage_fifo_file_perms; + allow $1 portage_tmp_t:sock_file manage_sock_file_perms; + files_search_tmp($1) +') + ######################################## ## ## Do not audit attempts to search the -- 2.16.4