diff --git a/refpolicy/policy/modules/system/corecommands.if b/refpolicy/policy/modules/system/corecommands.if index c9355bd69..78f7d30b5 100644 --- a/refpolicy/policy/modules/system/corecommands.if +++ b/refpolicy/policy/modules/system/corecommands.if @@ -1,4 +1,9 @@ # Copyright (C) 2005 Tresys Technology, LLC +## +## +## Core policy for shells, and generic programs +## in /bin, /sbin, /usr/bin, and /usr/sbin. +## ####################################### # @@ -124,14 +129,27 @@ class file { getattr read execute execute_no_trans }; ') ######################################## -# -# corecommands_shell_transition(domain) +## +## +## Execute a shell in the target domain. +## +## +## The type of the process performing this action. +## +## +## The type of the shell process. +## +## +## # define(`corecommands_shell_transition',` requires_block_template(`$0'_depend) allow $1 bin_t:dir { getattr search read }; allow $1 bin_t:lnk_file { getattr read }; allow $1 shell_exec_t:file { getattr read execute }; +allow $1 $2:process transition; +type_transition $1 shell_exec_t:file $2; +dontaudit $1 $2:process { noatsecure siginh rlimitinh }; ') define(`corecommands_shell_transition_depend',` @@ -157,3 +175,5 @@ type chroot_exec_t; class file { getattr read execute execute_no_trans }; class capability sys_chroot; ') + +##