Closed harshabg closed 3 years ago
Recipe: node['selinux']['booleans'] does not check if SELinux is in disabled state. If SELinux is disabled, the recipe selinux-booleans should skip .
Logs
script[boolean_antivirus_can_scan_system] action run
================================================================================ Error executing action `run` on resource 'script[boolean_antivirus_can_scan_system]' ================================================================================ Mixlib::ShellOut::ShellCommandFailed ------------------------------------ Expected process to exit with [0], but received '1' ---- Begin output of "bash" ---- STDOUT: STDERR: setsebool: SELinux is disabled. ---- End output of "bash" ---- Ran "bash" returned 1 Resource Declaration: --------------------- # In cookbooks/selinux/recipes/default.rb 28: script "boolean_#{boolean}" do 29: interpreter 'bash' 30: code "setsebool -P #{boolean} #{value}" 31: not_if "getsebool #{boolean} |egrep -q \" #{value}\"$" 32: end 33: end Compiled Resource: ------------------ # Declared in cookbooks/selinux/recipes/default.rb:28:in `block in from_file' script("boolean_antivirus_can_scan_system") do action [:run] default_guard_interpreter :default declared_type :script cookbook_name "selinux" recipe_name "default" interpreter "bash" code "setsebool -P antivirus_can_scan_system off" domain nil user nil not_if "getsebool antivirus_can_scan_system |egrep -q " off"$" end System Info: ------------ chef_version=16.4.41 platform=amazon platform_version=2 ruby=ruby 2.7.1p83 (2020-03-31 revision a0c7c23c9c) [x86_64-linux]
Recipe: node['selinux']['booleans'] does not check if SELinux is in disabled state. If SELinux is disabled, the recipe selinux-booleans should skip .
Logs
script[boolean_antivirus_can_scan_system] action run