<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Ned Slider wrote:
<blockquote cite="mid:489F796B.6080402@unixmail.co.uk" type="cite">Hi
list,
  <br>
  <br>
I've knocked up a contribution on SELinux here:
  <br>
  <br>
<a class="moz-txt-link-freetext" href="http://wiki.centos.org/HowTos/SELinux">http://wiki.centos.org/HowTos/SELinux</a>
  <br>
  <br>
I've tried to pitch it as an introduction for those not already
familiar with SELinux but also hopefully a useful reference.
  <br>
  <br>
I'm relatively new to SELinux and have covered pretty much everything I
know to the limits of my limited knowledge. If folks think other
material needs to be covered then it may be more appropriate for them
to make the additions rather than me. Consider it a "get the ball
rolling" contribution that the community can add to as necessary :)
  <br>
  <br>
Comments welcomed,
  <br>
</blockquote>
I would add the following just before "Sumamry" (in case one wants to
edit the rules suggested by audit2allow):<br>
<br>
<blockquote>Building module policy manually<br>
</blockquote>
<br>
- grep sendmail /var/log/audit/audit.log | audit2allow -M postfix<br>
- while reviewing the generated postfix.te<br>
<blockquote>module local 1.0;<br>
  <br>
require {<br>
        type httpd_log_t;<br>
        type postfix_postdrop_t;<br>
        class dir getattr;<br>
        class file { read getattr };<br>
}<br>
  <br>
#============= postfix_postdrop_t ==============<br>
allow postfix_postdrop_t httpd_log_t:file getattr;<br>
</blockquote>
<br>
we decide that we do not want either to <b>relabel</b> the files or to
<b>allow</b> the action, but it is safe to <b>ignore</b> the warnings.
Therefore we edit the action rule, like below:<br>
<blockquote>dontaudit postfix_postdrop_t httpd_log_t:file getattr;<br>
</blockquote>
We now need to compile and load the policy:<br>
<blockquote>$ checkmodule -M -m -o postfix.mod postfix.te<br>
$ semodule_package -o local.pp -m postfix.mod<br>
$ semodule -i postfix.pp<br>
</blockquote>
<br>
<br>
</body>
</html>