From nobody@FreeBSD.org  Tue Feb 19 02:18:56 2013
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115])
	by hub.freebsd.org (Postfix) with ESMTP id 52D97B61
	for <freebsd-gnats-submit@FreeBSD.org>; Tue, 19 Feb 2013 02:18:56 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22])
	by mx1.freebsd.org (Postfix) with ESMTP id 2FBF83A4
	for <freebsd-gnats-submit@FreeBSD.org>; Tue, 19 Feb 2013 02:18:56 +0000 (UTC)
Received: from red.freebsd.org (localhost [127.0.0.1])
	by red.freebsd.org (8.14.5/8.14.5) with ESMTP id r1J2ItFN038109
	for <freebsd-gnats-submit@FreeBSD.org>; Tue, 19 Feb 2013 02:18:55 GMT
	(envelope-from nobody@red.freebsd.org)
Received: (from nobody@localhost)
	by red.freebsd.org (8.14.5/8.14.5/Submit) id r1J2ItTR038108;
	Tue, 19 Feb 2013 02:18:55 GMT
	(envelope-from nobody)
Message-Id: <201302190218.r1J2ItTR038108@red.freebsd.org>
Date: Tue, 19 Feb 2013 02:18:55 GMT
From: Ryan Steinmetz <zi@FreeBSD.org>
To: freebsd-gnats-submit@FreeBSD.org
Subject: [openbsm][patch] praudit produces invalid XML (1.2-alpha3)
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         176259
>Category:       kern
>Synopsis:       [openbsm][patch] praudit produces invalid XML (1.2-alpha3)
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    brueffer
>State:          patched
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Feb 19 02:20:00 UTC 2013
>Closed-Date:    
>Last-Modified:  Wed Feb 26 19:08:13 CET 2014
>Originator:     Ryan Steinmetz
>Release:        
>Organization:
>Environment:
>Description:
OpenBSM 1.2-alpha3 contains a bug that causes it to produce invalid XML output.  The following is an example of the invalid output:
<?xml version='1.0' ?>
<audit>
<record ,56,11,audit startup,0,Tue Feb 19 00:58:45 2013, + 654 msec
<text>auditd::Audit startup</text>
<return errval="success" retval="0" />
</record>
>How-To-Repeat:
Run 'praudit -x ...' on a 9-STABLE or 10-CURRENT box.
>Fix:
Apply the attached patch.

Patch attached with submission follows:

--- ./libbsm/bsm_io.c.orig	2013-02-18 21:07:28.000000000 -0500
+++ ./libbsm/bsm_io.c	2013-02-18 21:07:38.000000000 -0500
@@ -949,7 +949,7 @@
 {
 
 	print_tok_type(fp, tok->id, "header", oflags);
-	if (oflags & AU_OFLAG_RAW) {
+	if (oflags & AU_OFLAG_XML) {
 		open_attr(fp, "version");
 		print_1_byte(fp, tok->tt.hdr32.version, "%u");
 		close_attr(fp);


>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->patched 
State-Changed-By: brueffer 
State-Changed-When: Wed Feb 26 19:06:55 CET 2014 
State-Changed-Why:  
I have committed this to the OpenBSM p4 repo.  The fix will be imported with 
the next OpenBSM release.  Thanks! 


Responsible-Changed-From-To: freebsd-bugs->brueffer 
Responsible-Changed-By: brueffer 
Responsible-Changed-When: Wed Feb 26 19:06:55 CET 2014 
Responsible-Changed-Why:  
Reminder. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=176259 
>Unformatted:
