I'm installing CentOS 7 in a chroot'd environment to build new
images of CentOS 7 for a private cloud environment. I've done this
successfully before with CentOS 6 (with help from this list) and we
have an automated process of doing that now. I'm now porting our
process to do similarly for CentOS 7. However, after our process is
complete, certain directories/symlinks have abnormal SELinux
contexts assigned to them. This causes the system to fail to boot
since we have SELinux enforcing by default and one of the
problematic symlinks is /lib64. Here is what we see in the CentOS 7 build tree root directory, right after a fresh install of CentOS 7 from the full updates repo: # ls -alZ / As you can see, the SELinux context for "lib", is
"/usr/lib"!!! and similarly, for "lib64", it is "/usr/lib" ... those
are not even valid context labels!How can an invalid string like "/usr/lib" even be assigned as a SELinux label in the first place? I can workaround this with a manual fix using 'chcon system_u:object_r:type_label:s0 path', but I'm just wondering how this can happen in the first place? When I try to manually reproduce the invalid label, I get this: # chcon /usr/lib lib chcon: invalid context: /usr/lib Any insights would be appreciated... Bond |
_______________________________________________ Selinux mailing list Selinux@xxxxxxxxxxxxx To unsubscribe, send email to Selinux-leave@xxxxxxxxxxxxx. To get help, send an email containing "help" to Selinux-request@xxxxxxxxxxxxx.