Date: Sun, 06 Aug 2006 01:30:23 +0200 From: Pawel Worach <pawel.worach@gmail.com> To: trustedbsd-discuss@FreeBSD.org Subject: praudit argument token display inconsistency Message-ID: <44D52A0F.1040009@gmail.com>
next in thread | raw e-mail | index | archive | help
Hi, 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. 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?44D52A0F.1040009>