<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Linux System Administration and Security &#187; SELinux</title>
	<atom:link href="http://www.jasonbrown.us/category/security/selinux/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.jasonbrown.us</link>
	<description></description>
	<lastBuildDate>Tue, 31 Jan 2012 02:58:29 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Editing SELinux Policies</title>
		<link>http://www.jasonbrown.us/2010/02/editing-selinux-policies/</link>
		<comments>http://www.jasonbrown.us/2010/02/editing-selinux-policies/#comments</comments>
		<pubDate>Mon, 15 Feb 2010 17:46:55 +0000</pubDate>
		<dc:creator>jason</dc:creator>
				<category><![CDATA[NSA]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[SELinux]]></category>
		<category><![CDATA[ausearch]]></category>
		<category><![CDATA[CentOS]]></category>
		<category><![CDATA[ClamAV]]></category>
		<category><![CDATA[RHEL]]></category>

		<guid isPermaLink="false">http://www.jasonbrown.us/?p=8</guid>
		<description><![CDATA[There are times where SELinux just does not want to play nice. For instance, after installing ClamAV I began running into problems where if I did not turn off SELinux while ClamAV was running, then SMTP traffic would fail. To fix this issue we must first look at the messages file under /var/log. Within this ]]></description>
			<content:encoded><![CDATA[<p>There are times where SELinux just does not want to play nice. For instance, after installing ClamAV I began running into problems where if I did not turn off SELinux while ClamAV was running, then SMTP traffic would fail. To fix this issue we must first look at the messages file under /var/log. Within this file we will see error messages like:<br />
<code>setroubleshoot: SELinux is preventing cleanup (postfix_cleanup_t) "search" to ./clamav (clamd_var_lib_t).</code></p>
<p>Which tells you to run the command:<br />
<code>sealert -l a1bc9b39-80a2-4f2e-963f-12daf766a8d4</code></p>
<p>Usually the report is very good and diagnosing and telling you which booleans to activate, however in this instance we have to create our own module.</p>
<p>First: Download and install selinux-policy-devel<br />
Second: Parse through the raw audit messages. We are looking for two things; message type and comm name.<br />
Third: Run the ausearch command and pipe it to audit2allow<br />
For instance: <code>ausearch -m AVC --comm cleanup | audit2allow -M ClamAV</code></p>
<p>Once the files have been generated then run: <code>semodule -i ClamAV.pp</code> and see if the problem has been resolved. If not, tail the messages log again to see if there is any additional SEAlerts that you should be aware of.</p>
<div class="tweetthis" style="text-align:left;"><p> <a target="_blank" rel="nofollow" class="tt" href="http://twitter.com/intent/tweet?text=Editing+SELinux+Policies+http%3A%2F%2Fjasonbrown.us%2F%3Fp%3D8" title="Post to Twitter"><img class="nothumb" src="http://www.jasonbrown.us/wp-content/plugins/tweet-this/icons/en/twitter/tt-twitter-big2.png" alt="Post to Twitter" /></a></p></div>]]></content:encoded>
			<wfw:commentRss>http://www.jasonbrown.us/2010/02/editing-selinux-policies/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

