From mboxrd@z Thu Jan 1 00:00:00 1970 From: Lev Stipakov Subject: audit 1.7.18 and auparse_feed_has_data Date: Mon, 1 Feb 2016 13:48:42 +0200 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: Received: from mx1.redhat.com (ext-mx02.extmail.prod.ext.phx2.redhat.com [10.5.110.26]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u11BmxDX011813 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO) for ; Mon, 1 Feb 2016 06:48:59 -0500 Received: from plane.gmane.org (plane.gmane.org [80.91.229.3]) by mx1.redhat.com (Postfix) with ESMTPS id EBBB196BD for ; Mon, 1 Feb 2016 11:48:57 +0000 (UTC) Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1aQCyU-0001Cq-U3 for linux-audit@redhat.com; Mon, 01 Feb 2016 12:48:55 +0100 Received: from 194.100.33.82 ([194.100.33.82]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 01 Feb 2016 12:48:54 +0100 Received: from lstipakov by 194.100.33.82 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 01 Feb 2016 12:48:54 +0100 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 Hi, I have a Debian 7.9 which includes libaudit-devel-1.7.18. That version does not have auparse_feed_has_data(). Its implementation looks simple, however it uses au_lo, which is declared as static in auparse.c and therefore cannot be accessed outside of that file. I took auparse_feed_has_data() usage from audisp-example.c tv.tv_sec = 5; tv.tv_usec = 0; FD_ZERO(&read_mask); FD_SET(0, &read_mask); if (auparse_feed_has_data(au)) retval= select(1, &read_mask, NULL, NULL, &tv); else retval= select(1, &read_mask, NULL, NULL, NULL); I noticed that old version of example plugin doesn't have auparse_feed_has_data() or select() calls (https://github.com/gdestuynder/audit-cef/blob/master/contrib/plugin/audisp-example.c#L104) What is the purpose of select/auparse_feed_has_data? Is it some kind of optimization or bug fix? Since I have to support Debian 7 and probably have to stick to audit 1.7 headers, is it safe to use the "old way"? -Lev