SELinux transition between hostname_t and initrc_tmp_t differs
Issue
If you are starting a service with no file contexts definitions on the binaries, then the process is running in the initrc_t domain.
-
If this process then executes a shellscript using bash it can execute the "hostname" command without problems.
-
But if this process executes a ksh script then SELinux blocks "hostname" commands in this shell script.
Environment
- Red Hat Enterprise Linux (RHEL) 6
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.