Linux-audit Archive mirror
 help / color / mirror / Atom feed
From: Paul Moore <paul@paul-moore.com>
To: Lenny Bruzenak <lenny@magitekltd.com>,
	Stephen Smalley <stephen.smalley.work@gmail.com>
Cc: linux-audit@redhat.com
Subject: Re: Excluding a script / process and its descendants from audit
Date: Thu, 14 Jul 2022 17:38:51 -0400	[thread overview]
Message-ID: <CAHC9VhSQ9PG6eBuxQuOafQeNJuLmqPrMmtjuKv_Kcm0GxzB+Tg@mail.gmail.com> (raw)
In-Reply-To: <fb86b6de-f1e6-a0fa-14e8-66d41725eea1@magitekltd.com>

On Thu, Jul 14, 2022 at 3:01 PM Lenny Bruzenak <lenny@magitekltd.com> wrote:
> On 7/14/22 11:53, Stephen Smalley wrote:
> > Hi,
> >
> > Is it possible to exclude a script from triggering audit records?
> > I know that one can exclude an executable via -a never,exit -F
> > exe=/path/to/exe but I haven't been able to find a way to do the same
> > for a script.
> > Also, is there a way to have the exclusion applied to all child
> > processes spawned by the script?
>
> So - the way I've done this is to set policy for the script to run in a
> certain unique type, then exclude that subj_type.
>
> For child processes, if they are spawned with the parent context you are
> set, otherwise I'm sure macros exist to accommodate that and you would
> be more familiar with those than me.

Agree with Lenny, I can't think of anything better.

-- 
paul-moore.com

--
Linux-audit mailing list
Linux-audit@redhat.com
https://listman.redhat.com/mailman/listinfo/linux-audit


      reply	other threads:[~2022-07-14 21:39 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-14 17:53 Excluding a script / process and its descendants from audit Stephen Smalley
2022-07-14 19:00 ` Lenny Bruzenak
2022-07-14 21:38   ` Paul Moore [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAHC9VhSQ9PG6eBuxQuOafQeNJuLmqPrMmtjuKv_Kcm0GxzB+Tg@mail.gmail.com \
    --to=paul@paul-moore.com \
    --cc=lenny@magitekltd.com \
    --cc=linux-audit@redhat.com \
    --cc=stephen.smalley.work@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).