<tt><font size=2>Daniel J Walsh &lt;dwalsh@redhat.com&gt; wrote on 12/07/2012
14:40:55:<br>
&gt; <br>
&gt; -----BEGIN PGP SIGNED MESSAGE-----<br>
&gt; Hash: SHA1<br>
&gt; <br>
&gt; On 12/07/2012 11:26 AM, John.Florian@dart.biz wrote:<br>
&gt; &gt; Daniel J Walsh &lt;dwalsh@redhat.com&gt; wrote on 12/07/2012
10:46:11:<br>
&gt; &gt;&gt; <br>
&gt; &gt;&gt; On 12/07/2012 08:44 AM, Bruno Wolff III wrote:<br>
&gt; &gt;&gt;&gt; On Fri, Dec 07, 2012 at 08:22:10 -0500, John.Florian@dart.biz
wrote:<br>
&gt; &gt;&gt;&gt;&gt; <br>
&gt; &gt;&gt;&gt;&gt; Thinking selinux might be preventing the relabel
from happening (?!?)<br>
&gt; &gt;&gt;&gt;&gt; I rebooted with selinux=0 so that I could reconfig<br>
&gt; &gt;&gt;&gt;&gt; /etc/sysconfig/selinux having SELINUX=permissive,
touched<br>
&gt; &gt;&gt;&gt;&gt; /.autorelabel and rebooted again. This time I saw
the relabel process<br>
&gt; &gt;&gt;&gt;&gt; do its thing and trigger a reboot. &nbsp;I then went
back to reconfig<br>
&gt; &gt;&gt;&gt;&gt; /etc/sysconfig/selinux having SELINUX=enforcing,
rebooted and all<br>
&gt; &gt;&gt;&gt;&gt; seemed well, finally.<br>
&gt; &gt;&gt;&gt; <br>
&gt; &gt;&gt;&gt; The autorelabel is supposed to happen early in the boot
process and I<br>
&gt; &gt;&gt;&gt; think it is supposed to work even if you system normally
comes up in<br>
&gt; &gt;&gt;&gt; enforcing mode. So that sounds like a bug.<br>
&gt; &gt;&gt;&gt; <br>
&gt; &gt;&gt;&gt; (You can come up in permissive mode using the enforcing=0
kernel<br>
&gt; &gt;&gt;&gt; parameter. This is a bit more convenient in some cases
for a one time<br>
&gt; &gt;&gt;&gt; boot, than changing the selinux configuration.)<br>
&gt; &gt;&gt;&gt; <br>
&gt; &gt;&gt;&gt; This is generally the safeest way to relabel as you don't
want<br>
&gt; &gt;&gt;&gt; processes that started with the wrong context creating
more incorrectly<br>
&gt; &gt;&gt;&gt; labelled files while you are trying to fix things up
(with say<br>
&gt; &gt;&gt;&gt; restorecon).<br>
&gt; &gt;&gt;&gt; <br>
&gt; &gt;&gt;&gt;&gt; So, I'm all good now, but there may be some bugs
in that &quot;relabel<br>
&gt; &gt;&gt;&gt;&gt; should happen automatically&quot; bit. -- John Florian<br>
&gt; &gt;&gt; Yes systemd is supposed to set the machine into permissive
mode for the <br>
&gt; &gt;&gt; relabel, but I guess if the machine is totally mislabeled,
systemd might<br>
&gt; &gt;&gt; be prevented from doing this, although I would figure systemd
would be<br>
&gt; &gt;&gt; running as the kernel label. &nbsp;Bottom line this would
be difficult to<br>
&gt; &gt;&gt; diagnose what happened to force you to relabel in permissive
mode. <br>
&gt; &gt;&gt; -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux)
Comment:<br>
&gt; &gt;&gt; Using GnuPG with undefined - </font></tt><a href=http://www.enigmail.net/><tt><font size=2>http://www.enigmail.net/</font></tt></a><tt><font size=2><br>
&gt; &gt;&gt; <br>
&gt; &gt;&gt; iEYEARECAAYFAlDCD0MACgkQrlYvE4MpobN0gACeIRh+3rBTIXX/GVvxxIrMnvUq
<br>
&gt; &gt;&gt; 1EUAoNfsFpd+zYOiPq9h/+fXol6j3mLO =kYu4 -----END PGP SIGNATURE-----<br>
&gt; &gt; <br>
&gt; &gt; <br>
&gt; &gt; I agree this would be hard to diagnose. &nbsp;I doubt I could
reproduce the<br>
&gt; &gt; situation given all this poor system has been through. &nbsp;That
and I'm<br>
&gt; &gt; already up to my ears in alligators trying to port our software
stack over<br>
&gt; &gt; to what's becoming F18.<br>
&gt; &gt; <br>
&gt; &gt; As I stated, it's no longer a problem for me, so I'm happy. &nbsp;I
just wanted<br>
&gt; &gt; to make sure those who would want to know had been informed.<br>
&gt; &gt; <br>
&gt; &gt; -- John Florian<br>
&gt; &gt; <br>
&gt; &gt; <br>
&gt; If you have a selinux-policy version of 57,58,59 it could have also
failed on<br>
&gt; the relabel in enforcing mode, since there was &nbsp;a major bug in
policy that<br>
&gt; should be fixed by -60.<br>
&gt; -----BEGIN PGP SIGNATURE-----<br>
&gt; Version: GnuPG v1.4.12 (GNU/Linux)<br>
&gt; Comment: Using GnuPG with undefined - </font></tt><a href=http://www.enigmail.net/><tt><font size=2>http://www.enigmail.net/</font></tt></a><tt><font size=2><br>
&gt; <br>
&gt; iEYEARECAAYFAlDCRkYACgkQrlYvE4MpobNVEwCg3sx2OlPipwq2YHlS+fxsozCb<br>
&gt; ayUAn2r56PioTL8Swc0nG9cglnpOT3tY<br>
&gt; =Bds9<br>
&gt; -----END PGP SIGNATURE-----<br>
</font></tt>
<br>
<br><font size=2 face="sans-serif">Believe it or not, I had enough ssh
history in konsole on that machine to scroll back and see where I was doing
the upgrade and lo and behold, it was on -59 at the time.</font>
<br>
<br><font size=2 face="sans-serif">Would it make sense to capture the policy
version in the audit.log alongside those AVCs? &nbsp;Seems like that would
be helpful when reviewing them. &nbsp;Or would it be useless without some
sort of &quot;tainted&quot; flag like the kernel uses to indicate when
the policy had been augmented in some way?<br>
--<br>
John Florian</font>
<br>