Question 80
After completing this practical task on a disposable RHEL10 training node: A training VM must boot with SELinux enforcing but `/etc/selinux/config` is set to permissive. Which operational safeguard helps keep the result correct and safe?
Explanation
Correct Answer
Check runtime and configured SELinux modes after policy changes. This guards against recurrence of: Persistent SELinux policy mode comes from boot configuration, not just `setenforce`. Confirm the lab's final state by: `getenforce` reports Enforcing after reboot and `sestatus` confirms the configured mode.
Incorrect Answers
Record both fields in security posture checks and require a reboot verification for boot setting changes. That control is best suited to a separate scenario: An administrator changes SELinux policy mode in `/etc/selinux/config` but the runtime `getenforce` output remains unchanged until the next reboot. It is not the best safeguard for the current mechanism: Persistent SELinux policy mode comes from boot configuration, not just `setenforce`.
Reapply default file contexts after moving service data into standard labeled directories. That control is best suited to a separate scenario: A protected lab directory was copied from `/home` and now has inappropriate user-home SELinux contexts under `/var/www/html`. It is not the best safeguard for the current mechanism: Persistent SELinux policy mode comes from boot configuration, not just `setenforce`.
Check existing assignments before modifying SELinux port labels. That control is best suited to a separate scenario: An existing TCP port is assigned to the wrong SELinux port type and `semanage port -a` fails because the port already exists. It is not the best safeguard for the current mechanism: Persistent SELinux policy mode comes from boot configuration, not just `setenforce`.