SELinux transition between hostname_t and initrc_tmp_t differs

Solution Verified - Updated -

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.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content