Linux-audit Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Michael C Thompson <thompsmc@us.ibm.com>
To: Steve Grubb <sgrubb@redhat.com>, Linux Audit <linux-audit@redhat.com>
Subject: [PATCH] Disable from user-space the addition of an exclude,never rule
Date: Fri, 02 Jun 2006 10:20:21 -0500	[thread overview]
Message-ID: <44805735.8090608@us.ibm.com> (raw)

Below is a patch which will cause auditctl to report that exclude,never 
is a meaningless rule construct. This patch was written as it was deemed 
that exclude,never does not make sense based on the man-pages, and that 
exclude,always and exclude,never are functionality equivalent.

Thanks,
Mike

----

Signed-off-by: Michael Thompson <mcthomps@us.ibm.com>

--- audit-1.2.3/src/auditctl.c  2006-05-18 16:24:20.000000000 -0500
+++ audit-1.2.3-patched/src/auditctl.c  2006-05-30 09:21:31.000000000 -0500
@@ -151,7 +151,10 @@ static int audit_rule_setup(const char *
         else
                 return 2;
         if (strstr(opt, "never"))
-               *act = AUDIT_NEVER;
+               if (*flags & AUDIT_FILTER_EXCLUDE)
+                       return 2;
+               else
+                       *act = AUDIT_NEVER;
         else if (strstr(opt, "possible"))
                 return 1;
         else if (strstr(opt, "always"))
--- audit-1.2.3/docs/auditctl.8 2006-05-17 16:57:25.000000000 -0500
+++ audit-1.2.3-patched/docs/auditctl.8 2006-05-30 09:28:02.000000000 -0500
@@ -55,7 +55,7 @@ Add a rule to the syscall exit list. Thi
  Add a rule to the user message filter list. This list is used by the 
kernel to filter events originating in user space before relaying them 
to the audit daemon. It should be noted that the only fields that are 
valid are: uid, auid, gid, and  pid. All other fields will be treated as 
non-matching.
  .TP
  .B exclude
-Add a rule to the event type exclusion filter list. This list is used 
to filter events that you do not want to see. For example, if you do not 
want to see any avc messages, you would using this list to record that. 
The message type that you do not wish to see is given with the msgtype 
field.
+Add a rule to the event type exclusion filter list. This list is used 
to filter events that you do not want to see. For example, if you do not 
want to see any avc messages, you would using this list to record that. 
The message type that you do not wish to see is given with the msgtype 
field. Note that only valid list/action pair for exclude is: exclude,always.
  .RE

  The following describes the valid actions for the rule:

             reply	other threads:[~2006-06-02 15:20 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-06-02 15:20 Michael C Thompson [this message]
2006-06-02 15:37 ` [PATCH] Disable from user-space the addition of an exclude, never rule Linda Knippers

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=44805735.8090608@us.ibm.com \
    --to=thompsmc@us.ibm.com \
    --cc=linux-audit@redhat.com \
    --cc=sgrubb@redhat.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