praudit argument token display inconsistency
Pawel Worach
pawel.worach at gmail.com
Sat Aug 5 23:32:28 UTC 2006
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
More information about the trustedbsd-discuss
mailing list