+++ This bug was initially created as a clone of Bug #1926511 +++ Description of problem: When I do not have selinux-policy-targeted installed and I still have "SELINUXTYPE=targeted" configured in /etc/selinux/config, restorecon will return hard-to-understand ENOENT error messages. Version-Release number of selected component (if applicable): policycoreutils-3.3-2.el9.x86_64 How reproducible: always Steps to Reproduce: 1. Uninstall selinux-policy-targeted and install selinux-policy-minimum 2. Ensure /etc/selinux/config has "SELINUXTYPE=targeted" (the WRONG policy) 3. touch /tmp/foo.txt 4. restorecon -v /tmp/foo.txt Actual results: restorecon fails with a mysterious error message "No such file or directory". Users are confused because /tmp/foo.txt does exist. Expected results: restorecon shows the user the exact path that corresponds to the fatal ENOENT error message. It's not /tmp/foo.txt, but it's something under /etc/selinux/targeted/.
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory (new packages: policycoreutils), and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2022:3920