public inbox for linux-audit@redhat.com
 help / color / mirror / Atom feed
* [PATCH] userspace: audit: ausearch doesn't return entries for AppArmor events that exist in the log
@ 2014-05-28 22:33 Tony Jones
  2014-05-29  8:31 ` Tyler Hicks
                   ` (2 more replies)
  0 siblings, 3 replies; 23+ messages in thread
From: Tony Jones @ 2014-05-28 22:33 UTC (permalink / raw)
  To: linux-audit; +Cc: seth.arnold, wpreston

This patch came from our L3 department.  AppArmor LSM is logging using the common_lsm_audit() 
call but the audit userspace parsing code expects to see an SELinux tclass field. This patch 
doesn't address the lack of support for AppArmor in "aureport --avc".  Talking to Seth Arnold, 
Canonical apparently has patches for this; if this is true perhaps they can post for inclusion.

Based-on-work-by: William Preston <wpreston@suse.com>
Signed-off-by: Tony Jones <tonyj@suse.de>

--- a/src/ausearch-parse.c      2014-05-21 14:45:22.000000000 +0200
+++ b/src/ausearch-parse.c      2014-05-21 14:53:55.000000000 +0200
@@ -1735,17 +1735,15 @@ static int parse_avc(const lnode *n, sea

        // Now get the class...its at the end, so we do things different
        str = strstr(term, "tclass=");
-       if (str == NULL) {
-               rc = 9;
-               goto err;
+       if (str) {
+               str += 7;
+               term = strchr(str, ' ');
+               if (term)
+                       *term = 0;
+               an.avc_class = strdup(str);
+               if (term)
+                       *term = ' ';
        }
-       str += 7;
-       term = strchr(str, ' ');
-       if (term)
-               *term = 0;
-       an.avc_class = strdup(str);
-       if (term)
-               *term = ' ';

        if (audit_avc_init(s) == 0) {
                alist_append(s->avc, &an);

^ permalink raw reply	[flat|nested] 23+ messages in thread
* Re: [PATCH] userspace: audit: ausearch doesn't return entries for AppArmor events that exist in the log
@ 2016-04-29  7:03 Vincas Dargis
  2016-04-29 13:39 ` Steve Grubb
  2016-04-29 15:41 ` Richard Guy Briggs
  0 siblings, 2 replies; 23+ messages in thread
From: Vincas Dargis @ 2016-04-29  7:03 UTC (permalink / raw)
  To: linux-audit

Hi,

There was email about fixing ausearch for AppArmor:

https://www.redhat.com/archives/linux-audit/2014-May/msg00094.html

Is there any progress regarding that issue?

I have tried to search for AVC on Debian Testing (auditd 2.4.5), and
it fails to "grep" me AppArmor related events.

P.S. How do I actually reply to original thread that I did not
received, since I just subscribed? I though I could maybe find raw
message in archive https://www.redhat.com/archives/linux-audit/ but
there aren't (no such message in 2014-May/Jun gz) . Oh how I hate
using mailing lists so much... /rant.

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

end of thread, other threads:[~2016-05-02 21:18 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-05-28 22:33 [PATCH] userspace: audit: ausearch doesn't return entries for AppArmor events that exist in the log Tony Jones
2014-05-29  8:31 ` Tyler Hicks
2014-05-29 15:01   ` Steve Grubb
2014-05-29 15:15     ` Tyler Hicks
2014-06-03  1:00   ` Tony Jones
2014-06-03 14:47     ` Steve Grubb
2014-06-03 16:34       ` Tony Jones
2014-05-29 15:21 ` Tyler Hicks
2014-05-30 19:53 ` Steve Grubb
2014-05-30 20:16   ` Tyler Hicks
2014-05-30 21:00     ` Steve Grubb
2014-05-31  0:01       ` Tony Jones
2014-06-06 18:46       ` Tyler Hicks
2014-06-06 21:10         ` Tyler Hicks
2014-06-24  0:06           ` Tony Jones
2014-06-24 15:34             ` Eric Paris
  -- strict thread matches above, loose matches on Subject: below --
2016-04-29  7:03 Vincas Dargis
2016-04-29 13:39 ` Steve Grubb
2016-04-29 16:07   ` Vincas Dargis
2016-04-29 16:30     ` Steve Grubb
2016-05-02 21:18       ` Paul Moore
2016-04-29 15:41 ` Richard Guy Briggs
2016-04-29 16:58   ` Vincas Dargis

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