WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] [PATCH] xen/xsm/flask: Fix AVC audit message format

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH] xen/xsm/flask: Fix AVC audit message format
From: Stephen Smalley <sds@xxxxxxxxxxxxx>
Date: Fri, 14 Aug 2009 10:18:27 -0400
Cc: "George S. Coker, II" <gscoker@xxxxxxxxxxxxxx>
Delivery-date: Fri, 14 Aug 2009 07:15:38 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Organization: National Security Agency
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Fix formatting of Flask AVC audit messages so that existing
policy tools can parse them.  After applying, 
'xm dmesg | audit2allow' yields the expected result.

Signed-off-by: Stephen D. Smalley <sds@xxxxxxxxxxxxx>
Signed-off-by: George S. Coker, II <gscoker@xxxxxxxxxxxxxx>

---

 xen/xsm/flask/avc.c |    8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/xen/xsm/flask/avc.c b/xen/xsm/flask/avc.c
--- a/xen/xsm/flask/avc.c
+++ b/xen/xsm/flask/avc.c
@@ -226,8 +226,8 @@
         printk(" tcontext=%s", scontext);
         xfree(scontext);
     }
-    printk("\n");
-    printk("tclass=%s", class_to_string[tclass]);
+
+    printk(" tclass=%s", class_to_string[tclass]);
 }
 
 /**
@@ -560,12 +560,10 @@
     if ( a && a->d )
         d = a->d;
     if ( d )
-        printk("domid=%d", d->domain_id);
+        printk("domid=%d ", d->domain_id);
 
-    printk("\n");
     avc_dump_query(ssid, tsid, tclass);
     printk("\n");
-
 }
 
 /**

-- 
Stephen Smalley
National Security Agency


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [PATCH] xen/xsm/flask: Fix AVC audit message format, Stephen Smalley <=