All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] selinux: print leading 0x on ioctlcmd audits
@ 2016-07-14 19:29 william.c.roberts
  2016-07-14 22:17   ` Paul Moore
  0 siblings, 1 reply; 24+ messages in thread
From: william.c.roberts @ 2016-07-14 19:29 UTC (permalink / raw)
  To: selinux; +Cc: sds, seandroid-list, jeffv, William Roberts

From: William Roberts <william.c.roberts@intel.com>

ioctlcmd is currently printing hex numbers, but their is no leading
0x. Thus things like ioctlcmd=1234 are misleading, as the base is
not evident.

Correct this by adding 0x as a prefix, so ioctlcmd=1234 becomes ioctlcmd=0x1234.

Signed-off-by: William Roberts <william.c.roberts@intel.com>
---
 security/lsm_audit.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/security/lsm_audit.c b/security/lsm_audit.c
index cccbf30..82e4dbb 100644
--- a/security/lsm_audit.c
+++ b/security/lsm_audit.c
@@ -257,7 +257,7 @@ static void dump_common_audit_data(struct audit_buffer *ab,
 			audit_log_format(ab, " ino=%lu", inode->i_ino);
 		}
 
-		audit_log_format(ab, " ioctlcmd=%hx", a->u.op->cmd);
+		audit_log_format(ab, " ioctlcmd=0x%hx", a->u.op->cmd);
 		break;
 	}
 	case LSM_AUDIT_DATA_DENTRY: {
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 24+ messages in thread

end of thread, other threads:[~2016-07-15 20:12 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-07-14 19:29 [PATCH] selinux: print leading 0x on ioctlcmd audits william.c.roberts
2016-07-14 22:17 ` Paul Moore
2016-07-14 22:17   ` Paul Moore
2016-07-14 23:18   ` William Roberts
2016-07-14 23:18     ` William Roberts
2016-07-14 23:33     ` William Roberts
2016-07-14 23:33       ` William Roberts
2016-07-15 18:19       ` Paul Moore
2016-07-15 18:19         ` Paul Moore
2016-07-15 18:54   ` Steve Grubb
2016-07-15 18:54     ` Steve Grubb
2016-07-15 19:02     ` Paul Moore
2016-07-15 19:02       ` Paul Moore
2016-07-15 19:33       ` Roberts, William C
2016-07-15 19:41         ` Steve Grubb
2016-07-15 19:41           ` Steve Grubb
2016-07-15 19:49           ` Roberts, William C
2016-07-15 19:49             ` Roberts, William C
2016-07-15 20:12             ` Steve Grubb
2016-07-15 20:12               ` Steve Grubb
2016-07-15 19:31     ` Roberts, William C
2016-07-15 19:31       ` Roberts, William C
     [not found]       ` <476DC76E7D1DF2438D32BFADF679FC56012585A7-P5GAC/sN6hlQxe9IK+vIArfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2016-07-15 19:35         ` Paul Moore
2016-07-15 19:35           ` Paul Moore

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.