<div dir="ltr"><div><div><div><div><div><div><div>Yes, both executables in this case are shell scripts, so you&#39;re most likely right. (*)<br><br></div>The original scenario seems different though, as the following conditions are met there:<br></div>-- there is an init script with the context syslogd_initrc_exec_t, which calls a<br></div>-- symlink under /opt/&lt;product&gt;/sbin which has the context of bin_t, and is a reference for the<br></div>-- binary executable /opt/&lt;product&gt;/libexec/&lt;executable&gt; which has a context of syslogd_exec_t.<br><br></div>Normally this setup works just fine, but one of our customers encountered a situation where the daemon is stuck as initrc_t.<br></div>We have tried verifying every little detail, but we failed to spot any differences between their environment, where the problem persists, and ours, where everything works fine.<br><br><br></div>(*) I think, I will write a short C program in order to find out whether this was in deed the main reason why my demo script failed to transition to syslogd_t.<br><div><div><div><div><div><div><div><br></div></div></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">2015-05-18 20:34 GMT+02:00 Stephen Smalley <span dir="ltr">&lt;<a href="mailto:sds@tycho.nsa.gov" target="_blank">sds@tycho.nsa.gov</a>&gt;</span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5">On 05/15/2015 04:30 AM, SZIGETVÁRI János wrote:<br>
&gt; Hello Again,<br>
&gt;<br>
&gt; I have managed to reproduce the problem on CentOS 7 as well, but due to<br>
&gt; the exlusion of the run_init command, the script needed a bit of<br>
&gt; tailoring as well.<br>
&gt; I have attached the modified script. (To make up for the &quot;lost&quot;<br>
&gt; run_init, the script has to have the<br>
&gt; &quot;system_u:object_r:run_init_exec_t:s0&quot; context.)<br>
&gt; Anyway, the problem&#39;s solution is more pressing on CentOS 6, so any help<br>
&gt; or hints would be appreciated.<br>
<br>
</div></div>Sorry, it looks like you are running the equivalent of:<br>
bash /path/to/script<br>
in each of your scripts.<br>
<br>
Which means exec bash and have it open the script file and read it, then<br>
interpret it.  So we never call execve() on the script file and thus we<br>
never perform a domain transition.  Is that what you were doing in your<br>
original situation too?<br>
<br>
<br>
</blockquote></div><br><br clear="all"><br>-- <br><div class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr">Janos SZIGETVARI<br><br>E-mail: <a href="mailto:jszigetvari@gmail.com" target="_blank">jszigetvari@gmail.com</a><br>Phone: +36209440412 (Hungary)<br><br>__@__˚V˚<br>Make the switch to open (source) applications, protocols, formats now:<br>- windows -&gt; Linux, iexplore -&gt; Firefox, msoffice -&gt; LibreOffice.org<br>- msn -&gt; jabber protocol (Pidgin, Google Talk)<br>- mp3 -&gt; ogg, wmv -&gt; ogg, jpg -&gt; png, doc/xls/ppt -&gt; odt/ods/odp</div></div></div></div></div></div>
</div></div></div></div>