From mboxrd@z Thu Jan 1 00:00:00 1970 From: Miloslav =?UTF-8?Q?Trma=C4=8D?= Subject: Re: auparse question Date: Fri, 06 Jun 2008 19:36:41 +0000 Message-ID: <1212781001.15953.12.camel@amilo> References: <1212780014.6726.26.camel@homeserver> Mime-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: quoted-printable Return-path: In-Reply-To: <1212780014.6726.26.camel@homeserver> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-audit-bounces@redhat.com Errors-To: linux-audit-bounces@redhat.com To: LC Bruzenak Cc: Linux Audit List-Id: linux-audit@redhat.com LC Bruzenak p=C3=AD=C5=A1e v P=C3=A1 06. 06. 2008 v 14:20 -0500: > I send in my own n=3Dv pairs. > The auparse library code returns all the name elements but on a string > value with embedded spaces it stops at the first space. > I read through most of the list entries regarding this and also Steve's > auparse text page and I must be missing the answer; apology in advance > since after reading through most of the replies I realized it has been > discussed thoroughly, but I do not see the answer. There's no answer. auparse (except for some special cases) splits fields at spaces. One usual way of handling spaces is to use the hex-encoded form for field representation, and decode it either using auparse_interpret_field() (which hard-codes the ways to decode specific field types, and does nothing for unknown types), or in the application. The other usual way of handling spaces is to just write them in the record and let the applications deal with them however they want (you can get the raw record text out of auparse, after all). I plan to make auparse more useful in this regard, but the best I can hope for is adding more special cases for specific field and record types. A long-term, future-proof solution must involve some changes to the record format definition. Mirek