From mboxrd@z Thu Jan 1 00:00:00 1970 From: Steve Grubb Subject: Re: audit.rules file [Was: audit 2.3 released] Date: Mon, 06 May 2013 09:17:18 -0400 Message-ID: <6136940.FpU5ZKyNch@x2> References: <3021693.HLtnhthvcE@x2> <20130505114357.7790a544@fornost.bigon.be> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20130505114357.7790a544@fornost.bigon.be> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-audit-bounces@redhat.com Errors-To: linux-audit-bounces@redhat.com To: linux-audit@redhat.com List-Id: linux-audit@redhat.com Hello, On Sunday, May 05, 2013 11:43:57 AM Laurent Bigonville wrote: > > Several people have asked for a way to deposit rules into a directory > > so that based on what is installed, rules can also be added. This > > makes it easier to have a core system that gets packages, config, and > > files added to make it a different kind of server or desktop. My > > guess is that it will be mostly used to add watches on setuid apps > > which can differ from machine type to machine type. > > > > The place where these rules are stored is /etc/audit/rules.d. > > Compiling rules from that directory will result in a new file being > > written to /etc/audit/audit.rules. That means it can overwrite > > existing rules. Since we don't want that to happen by accident, > > augenrules is disabled by default. > > [...] > > The make install rule is now installing audit.rules in > the /etc/audit/rules.d directory. > > What would happen on fresh installation if augenrules call is disabled > and that /etc/audit/audit.rules is not existing? > > Will /etc/audit/rules.d/audit.rules be called as a fallback? Or should > distributions take care of shipping both /etc/audit/audit.rules > and /etc/audit/rules.d/audit.rules? > > What do you think? What I did in Fedora is to add a post install action like this: %post # Copy default rules into place on new installation if [ ! -e /etc/audit/audit.rules ] ; then cp /etc/audit/rules.d/audit.rules /etc/audit/audit.rules fi This way if its a new install, you get a copy of the rules and if there are any previously existing rules, they are not overwritten. -Steve