commit: d47c34f5d993c54990c4a9504950b880dcc3145d Author: Jason Zaman <jason <AT> perfinion <DOT> com> AuthorDate: Thu Jun 7 10:38:57 2018 +0000 Commit: Jason Zaman <perfinion <AT> gentoo <DOT> org> CommitDate: Fri Jun 8 11:10:51 2018 +0000 URL: https://gitweb.gentoo.org/proj/hardened-refpolicy.git/commit/?id=d47c34f5
lvm: allow reading initrc pipes Bug: https://bugs.gentoo.org/615300 policy/modules/system/init.if | 18 ++++++++++++++++++ policy/modules/system/lvm.te | 5 ++++- 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/policy/modules/system/init.if b/policy/modules/system/init.if index 46e61cb4..d6a8f2ee 100644 --- a/policy/modules/system/init.if +++ b/policy/modules/system/init.if @@ -1859,6 +1859,24 @@ interface(`init_ptrace',` allow $1 init_t:process ptrace; ') +######################################## +## <summary> +## Read an init script unnamed pipe. +## </summary> +## <param name="domain"> +## <summary> +## Domain allowed access. +## </summary> +## </param> +# +interface(`init_read_script_pipes',` + gen_require(` + type initrc_t; + ') + + allow $1 initrc_t:fifo_file read_fifo_file_perms; +') + ######################################## ## <summary> ## Write an init script unnamed pipe. diff --git a/policy/modules/system/lvm.te b/policy/modules/system/lvm.te index 9df06823..446ab777 100644 --- a/policy/modules/system/lvm.te +++ b/policy/modules/system/lvm.te @@ -393,9 +393,12 @@ ifdef(`distro_gentoo',` create_dirs_pattern(lvm_t, lvm_etc_t, lvm_metadata_t) # Bug 529430 comment 6 create_dirs_pattern(lvm_t, lvm_etc_t, lvm_etc_t) - # BUg 529430 comment 8 + # Bug 529430 comment 8 manage_fifo_files_pattern(lvm_t, lvm_var_run_t, lvm_var_run_t) + # Bug 615300 + init_read_script_pipes(lvm_t) + filetrans_pattern(lvm_t, lvm_etc_t, lvm_metadata_t, dir, "cache") kernel_request_load_module(lvm_t)
