praudit argument token display inconsistency

Robert Watson rwatson at FreeBSD.org
Tue Aug 15 16:23:57 UTC 2006


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 at FreeBSD.org mailing list
> http://lists.freebsd.org/mailman/listinfo/trustedbsd-discuss
> To unsubscribe, send any mail to "trustedbsd-discuss-unsubscribe at FreeBSD.org"
>


More information about the trustedbsd-discuss mailing list