Linux-audit Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Disable from user-space the addition of an exclude,never rule
@ 2006-06-02 15:20 Michael C Thompson
  2006-06-02 15:37 ` [PATCH] Disable from user-space the addition of an exclude, never rule Linda Knippers
  0 siblings, 1 reply; 2+ messages in thread
From: Michael C Thompson @ 2006-06-02 15:20 UTC (permalink / raw)
  To: Steve Grubb, Linux Audit

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:

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2006-06-02 15:37 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-06-02 15:20 [PATCH] Disable from user-space the addition of an exclude,never rule Michael C Thompson
2006-06-02 15:37 ` [PATCH] Disable from user-space the addition of an exclude, never rule Linda Knippers

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox