From owner-trustedbsd-discuss@FreeBSD.ORG Tue Aug 15 16:23:57 2006 Return-Path: X-Original-To: trustedbsd-discuss@FreeBSD.org Delivered-To: trustedbsd-discuss@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 52B3516A4E1 for ; Tue, 15 Aug 2006 16:23:57 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [209.31.154.42]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4A40F43D7E for ; Tue, 15 Aug 2006 16:23:53 +0000 (GMT) (envelope-from rwatson@FreeBSD.org) Received: from fledge.watson.org (fledge.watson.org [209.31.154.41]) by cyrus.watson.org (Postfix) with ESMTP id 8D8F146B0A; Tue, 15 Aug 2006 12:23:52 -0400 (EDT) Date: Tue, 15 Aug 2006 17:23:52 +0100 (BST) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: Pawel Worach In-Reply-To: <44D52A0F.1040009@gmail.com> Message-ID: <20060815172301.G45647@fledge.watson.org> References: <44D52A0F.1040009@gmail.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: trustedbsd-discuss@FreeBSD.org Subject: Re: praudit argument token display inconsistency X-BeenThere: trustedbsd-discuss@FreeBSD.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: TrustedBSD General Discussion List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Aug 2006 16:23:57 -0000 On Sun, 6 Aug 2006, Pawel Worach wrote: > Is there a specific reason when printing an arg32 or arg64 token with > praudit the # modifier is used for %x ? For zero token vales this causes an > inconsistency like shown below, 0 vs. 0x1. OpenSolaris prints zero token > values as 0x0. Pawel, Sorry for the delay in getting back to you. There is no reason that I know of. I've submitted your fix to Perforce, and it will appear in OpenBSM 1.0a8 later this week. Thanks for your help! Robert N M Watson Computer Laboratory University of Cambridge > > header,162,1,chown(2),0,Sun Aug 6 00:22:19 2006, + 364 msec > argument,2,0,new file uid > argument,3,0,new file gid > ... > > header,162,1,chown(2),0,Sun Aug 6 00:24:21 2006, + 532 msec > argument,2,0x1,new file uid > argument,3,0x1,new file gid > ... > > Quick fix: > Index: contrib/openbsm/libbsm/bsm_io.c > =================================================================== > RCS file: /export/ctm/cvs/src/contrib/openbsm/libbsm/bsm_io.c,v > retrieving revision 1.1.1.3 > diff -u -r1.1.1.3 bsm_io.c > --- contrib/openbsm/libbsm/bsm_io.c 5 Jun 2006 10:52:11 -0000 > 1.1.1.3 > +++ contrib/openbsm/libbsm/bsm_io.c 5 Aug 2006 23:28:12 -0000 > @@ -820,7 +820,7 @@ > print_delim(fp, del); > print_1_byte(fp, tok->tt.arg32.no, "%u"); > print_delim(fp, del); > - print_4_bytes(fp, tok->tt.arg32.val, "%#x"); > + print_4_bytes(fp, tok->tt.arg32.val, "0x%x"); > print_delim(fp, del); > print_string(fp, tok->tt.arg32.text, tok->tt.arg32.len); > } > @@ -859,7 +859,7 @@ > print_delim(fp, del); > print_1_byte(fp, tok->tt.arg64.no, "%u"); > print_delim(fp, del); > - print_8_bytes(fp, tok->tt.arg64.val, "%#llx"); > + print_8_bytes(fp, tok->tt.arg64.val, "0x%llx"); > print_delim(fp, del); > print_string(fp, tok->tt.arg64.text, tok->tt.arg64.len); > } > > Regards > -- > Pawel > _______________________________________________ > trustedbsd-discuss@FreeBSD.org mailing list > http://lists.freebsd.org/mailman/listinfo/trustedbsd-discuss > To unsubscribe, send any mail to "trustedbsd-discuss-unsubscribe@FreeBSD.org" >