Question 40
Following lab verification, document the preventive or persistence-oriented procedure for: An administrator temporarily changes SELinux to permissive mode for diagnostics and believes it will remain so after reboot. Which practice is most suitable?
Explanation
Correct Answer
Use narrowly timed diagnostics and restore enforcing mode after analyzing denial logs. This guards against recurrence of: `setenforce` changes runtime state while SELinux's configured boot mode is separate. Confirm the lab's final state by: `getenforce` shows permissive during the test, then enforcing after restoration without assuming persistence.
Incorrect Answers
Check runtime and configured SELinux modes after policy changes. That control is best suited to a separate scenario: A training VM must boot with SELinux enforcing but `/etc/selinux/config` is set to permissive. It is not the best safeguard for the current mechanism: `setenforce` changes runtime state while SELinux's configured boot mode is separate.
Verify port-label assignment and firewall exposure separately for nonstandard listener ports. That control is best suited to a separate scenario: A test web daemon is configured to listen on TCP 8088 but SELinux blocks binding despite a matching firewall rule. It is not the best safeguard for the current mechanism: `setenforce` changes runtime state while SELinux's configured boot mode is separate.
Verify persistence and remove temporary diagnostic firewall permits. That control is best suited to a separate scenario: A firewall change is tested using only a runtime rule, but an administrator assumes it will be present after restart. It is not the best safeguard for the current mechanism: `setenforce` changes runtime state while SELinux's configured boot mode is separate.