From mboxrd@z Thu Jan 1 00:00:00 1970 From: Steve Grubb Subject: Re: auparse question Date: Wed, 31 Aug 2011 12:49:05 -0400 Message-ID: <201108311249.05681.sgrubb@redhat.com> References: <1314738737.2034.77.camel@lcb> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1314738737.2034.77.camel@lcb> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-audit-bounces@redhat.com Errors-To: linux-audit-bounces@redhat.com To: linux-audit@redhat.com List-Id: linux-audit@redhat.com On Tuesday, August 30, 2011 05:12:17 PM LC Bruzenak wrote: > I'm using auparse_get_field_type from the parse lib. > The return value for error is "0" which is also that of the AUDIT_PID > field. > > Right? I am getting some errors that thought they were PIDs. That does seem to be a mistake in the API. As a workaround for this, you can check for an error with auparse_get_record_text() == NULL. I suppose I could fix the problem going forward by making auparse_get_type() return -1 on error. -Steve