From owner-trustedbsd-discuss@FreeBSD.ORG Sat Aug 5 23:32:28 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 7D8F916A4DF for ; Sat, 5 Aug 2006 23:32:28 +0000 (UTC) (envelope-from pawel.worach@gmail.com) Received: from hu-out-0102.google.com (hu-out-0102.google.com [72.14.214.193]) by mx1.FreeBSD.org (Postfix) with ESMTP id D0CDF43D6A for ; Sat, 5 Aug 2006 23:32:04 +0000 (GMT) (envelope-from pawel.worach@gmail.com) Received: by hu-out-0102.google.com with SMTP id 27so371234hub for ; Sat, 05 Aug 2006 16:32:02 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:user-agent:mime-version:to:subject:content-type:content-transfer-encoding; b=Bp/8t0ZZ+myef6FXSntxmX0zogByaPGmoKrtP3a7O1sX7LbY7yzVZflxPg8de9rXLCKcLqHIADZEc/SWR4OwOQ7TJC9buq3jXWDL4GgN/LS3u0dEQPwg0enJBxEL6ilh4qt+v4l99Evj8i4qODhGmnNJ/fQiFm7snZhieLG1kSY= Received: by 10.78.139.5 with SMTP id m5mr2003343hud; Sat, 05 Aug 2006 16:30:30 -0700 (PDT) Received: from ?192.168.1.200? ( [80.217.194.157]) by mx.gmail.com with ESMTP id y18sm904175hua.2006.08.05.16.30.29; Sat, 05 Aug 2006 16:30:30 -0700 (PDT) Message-ID: <44D52A0F.1040009@gmail.com> Date: Sun, 06 Aug 2006 01:30:23 +0200 From: Pawel Worach User-Agent: Thunderbird 1.5.0.5 (X11/20060730) MIME-Version: 1.0 To: trustedbsd-discuss@FreeBSD.org Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: 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: Sat, 05 Aug 2006 23:32:28 -0000 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