<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Jul 14, 2016 at 4:18 PM, William Roberts <span dir="ltr"><<a href="mailto:bill.c.roberts@gmail.com" target="_blank">bill.c.roberts@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote"><span class="">On Thu, Jul 14, 2016 at 3:17 PM, Paul Moore <span dir="ltr"><<a href="mailto:paul@paul-moore.com" target="_blank">paul@paul-moore.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Thu, Jul 14, 2016 at 3:29 PM,  <<a href="mailto:william.c.roberts@intel.com" target="_blank">william.c.roberts@intel.com</a>> wrote:<br>
> From: William Roberts <<a href="mailto:william.c.roberts@intel.com" target="_blank">william.c.roberts@intel.com</a>><br>
><br>
> ioctlcmd is currently printing hex numbers, but their is no leading<br>
> 0x. Thus things like ioctlcmd=1234 are misleading, as the base is<br>
> not evident.<br>
><br>
> Correct this by adding 0x as a prefix, so ioctlcmd=1234 becomes ioctlcmd=0x1234.<br>
><br>
> Signed-off-by: William Roberts <<a href="mailto:william.c.roberts@intel.com" target="_blank">william.c.roberts@intel.com</a>><br>
> ---<br>
>  security/lsm_audit.c | 2 +-<br>
>  1 file changed, 1 insertion(+), 1 deletion(-)<br>
<br>
NOTE: adding Steve Grubb and the audit mailing list to the CC line<br>
<br>
Like it or not, I believe the general standard/convention when it<br>
comes to things like this is to leave off the "0x" prefix; the idea<br>
being that is saves precious space in the audit logs and the value is<br>
only ever going to be in hex anyway.<br></blockquote><div><br></div></span><div>Is it always in hex, what about pid?</div></div></div></div></blockquote><div><br></div><div>Outside of escaped untrusted input, everything I see is printed in base10. But if its convention that "you should just know", I am fine<br>with that too, its just that it wasn't self evident in the logs, and the first time I encountered it their was no documentation or tooling</div><div>supporting it.</div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div><div class="h5"><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
> diff --git a/security/lsm_audit.c b/security/lsm_audit.c<br>
> index cccbf30..82e4dbb 100644<br>
> --- a/security/lsm_audit.c<br>
> +++ b/security/lsm_audit.c<br>
> @@ -257,7 +257,7 @@ static void dump_common_audit_data(struct audit_buffer *ab,<br>
>                         audit_log_format(ab, " ino=%lu", inode->i_ino);<br>
>                 }<br>
><br>
> -               audit_log_format(ab, " ioctlcmd=%hx", a->u.op->cmd);<br>
> +               audit_log_format(ab, " ioctlcmd=0x%hx", a->u.op->cmd);<br>
>                 break;<br>
>         }<br>
>         case LSM_AUDIT_DATA_DENTRY: {<br>
<span><font color="#888888">> --<br>
> 1.9.1<br>
><br>
> _______________________________________________<br>
> Selinux mailing list<br>
> <a href="mailto:Selinux@tycho.nsa.gov" target="_blank">Selinux@tycho.nsa.gov</a><br>
> To unsubscribe, send email to <a href="mailto:Selinux-leave@tycho.nsa.gov" target="_blank">Selinux-leave@tycho.nsa.gov</a>.<br>
> To get help, send an email containing "help" to <a href="mailto:Selinux-request@tycho.nsa.gov" target="_blank">Selinux-request@tycho.nsa.gov</a>.<br>
<br>
--<br>
paul moore<br>
<a href="http://www.paul-moore.com" rel="noreferrer" target="_blank">www.paul-moore.com</a><br>
_______________________________________________<br>
Selinux mailing list<br>
<a href="mailto:Selinux@tycho.nsa.gov" target="_blank">Selinux@tycho.nsa.gov</a><br>
To unsubscribe, send email to <a href="mailto:Selinux-leave@tycho.nsa.gov" target="_blank">Selinux-leave@tycho.nsa.gov</a>.<br>
To get help, send an email containing "help" to <a href="mailto:Selinux-request@tycho.nsa.gov" target="_blank">Selinux-request@tycho.nsa.gov</a>.<br>
</font></span></blockquote></div></div></div><span class="HOEnZb"><font color="#888888"><br><br clear="all"><div><br></div>-- <br><div data-smartmail="gmail_signature">Respectfully,<br><br>William C Roberts<br><br></div>
</font></span></div></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature">Respectfully,<br><br>William C Roberts<br><br></div>
</div></div>