Date: Tue, 15 Aug 2006 17:23:52 +0100 (BST) From: Robert Watson <rwatson@FreeBSD.org> To: Pawel Worach <pawel.worach@gmail.com> Cc: trustedbsd-discuss@FreeBSD.org Subject: Re: praudit argument token display inconsistency Message-ID: <20060815172301.G45647@fledge.watson.org> In-Reply-To: <44D52A0F.1040009@gmail.com> References: <44D52A0F.1040009@gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
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" >
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20060815172301.G45647>