summaryrefslogtreecommitdiffstats
path: root/security/lsm_audit.c
diff options
context:
space:
mode:
authorWilliam Roberts <william.c.roberts@intel.com>2016-08-08 13:08:34 -0400
committerPaul Moore <paul@paul-moore.com>2016-08-08 13:08:34 -0400
commit8b31f456c72e53ee97474a538bcd91bfb1b93fb7 (patch)
treea87f9203cde7d38af6009c8198277a1335dbf8b2 /security/lsm_audit.c
parent1a93a6eac32a2853177f10e274b9b761b42356eb (diff)
downloadlinux-8b31f456c72e53ee97474a538bcd91bfb1b93fb7.tar.gz
linux-8b31f456c72e53ee97474a538bcd91bfb1b93fb7.tar.bz2
linux-8b31f456c72e53ee97474a538bcd91bfb1b93fb7.zip
selinux: print leading 0x on ioctlcmd audits
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> Signed-off-by: Paul Moore <paul@paul-moore.com>
Diffstat (limited to 'security/lsm_audit.c')
-rw-r--r--security/lsm_audit.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/security/lsm_audit.c b/security/lsm_audit.c
index 5369036cf905..9bf851884800 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: {