From patchwork Thu Jul 14 19:29:22 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Roberts, William C" X-Patchwork-Id: 9230501 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 40E5960574 for ; Thu, 14 Jul 2016 19:30:35 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2D7C027FBE for ; Thu, 14 Jul 2016 19:30:35 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 22246282F5; Thu, 14 Jul 2016 19:30:35 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=2.0 tests=BAYES_00 autolearn=ham version=3.3.1 Received: from emsm-gh1-uea10.nsa.gov (emsm-gh1-uea10.nsa.gov [8.44.101.8]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 5BED027FBE for ; Thu, 14 Jul 2016 19:30:33 +0000 (UTC) X-IronPort-AV: E=Sophos;i="5.28,364,1464652800"; d="scan'208";a="15594211" IronPort-PHdr: =?us-ascii?q?9a23=3A7gNHmhe+b66rNEiyeTarX1+QlGMj4u6mDksu8pMi?= =?us-ascii?q?zoh2WeGdxc+9Yx7h7PlgxGXEQZ/co6odzbGH6+a8AydZuMfJmUtBWaQEbwUCh8?= =?us-ascii?q?QSkl5oK+++Imq/EsTXaTcnFt9JTl5v8iLzG0FUHMHjew+a+SXqvnYsExnyfTB4?= =?us-ascii?q?Ov7yUtaLyZ/mj6buodaKOlQArQH+SIs6FA+xowTVu5teqqpZAYF19CH0pGBVcf?= =?us-ascii?q?9d32JiKAHbtR/94sCt4MwrqHwI6Loc7coIbYHWN+R9FOQZX3wbNXso7pjrqQXb?= =?us-ascii?q?H0zI/mEbV2gKkhdVGE7E6h/9RZr69Dfrvep6ni+RJsawSLEwHjGr7qNuQRmvjz?= =?us-ascii?q?8bNjk/6ybMh8hxir9L8y+nvAF1lovdYYWJM6hlc6fce84KAHBMR9tcTDBpHpK3?= =?us-ascii?q?b4xJCfEIe+lfsd7mulEMoBCiUBSqH/7l0TRSh3X7jpE9hv8sFQDAwRwIA8MFsH?= =?us-ascii?q?OSqs78cqgVT7Ob1q7NmCrCa/dX0DK7487SdRosu+2XdbN2bcfVj0IoElCWxm6M?= =?us-ascii?q?oJDoamvGnt8GtHKWuq85De8=3D?= X-IPAS-Result: =?us-ascii?q?A2HQBgDS54dX/wHyM5BcHAEBgyCBUqZik3oihzdMAQEBAQE?= =?us-ascii?q?BAgJiJ4IyBAMQghsCJBMMCAIeCwMDAQIGAhcIIQgIAwEtFR8LBRgEiA/BLAEBC?= =?us-ascii?q?AIBJIgqhl0CEQFohQ8FjnyKI45ZAolkhUkCkG2CCRyBbE4BhikPF4EeAQEB?= Received: from unknown (HELO tarius.tycho.ncsc.mil) ([144.51.242.1]) by emsm-gh1-uea10.nsa.gov with ESMTP; 14 Jul 2016 19:30:31 +0000 Received: from prometheus.infosec.tycho.ncsc.mil (prometheus [192.168.25.40]) by tarius.tycho.ncsc.mil (8.14.4/8.14.4) with ESMTP id u6EJTUp0005696; Thu, 14 Jul 2016 15:29:39 -0400 Received: from tarius.tycho.ncsc.mil (tarius.infosec.tycho.ncsc.mil [144.51.242.1]) by prometheus.infosec.tycho.ncsc.mil (8.15.2/8.15.2) with ESMTP id u6EJTTnf071690 for ; Thu, 14 Jul 2016 15:29:29 -0400 Received: from goalie.tycho.ncsc.mil (goalie [144.51.242.250]) by tarius.tycho.ncsc.mil (8.14.4/8.14.4) with ESMTP id u6EJTT2W005688; Thu, 14 Jul 2016 15:29:29 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A1AeBQBX54dX/yNjr8ZcHAEBgyCBUrZdhAoShgeBNUwBAQEBAQFmhTFSMIEhiDDBLQEwiCqGXXyFDwWOfIojjlkCjy0CkBlUggkcgWwcMgGGKYFEAQEB X-IPAS-Result: A1AeBQBX54dX/yNjr8ZcHAEBgyCBUrZdhAoShgeBNUwBAQEBAQFmhTFSMIEhiDDBLQEwiCqGXXyFDwWOfIojjlkCjy0CkBlUggkcgWwcMgGGKYFEAQEB X-IronPort-AV: E=Sophos;i="5.28,364,1464667200"; d="scan'208";a="5581773" Received: from emsm-gh1-uea11.corp.nsa.gov (HELO emsm-gh1-uea11.nsa.gov) ([10.208.41.37]) by goalie.tycho.ncsc.mil with ESMTP; 14 Jul 2016 15:29:28 -0400 IronPort-PHdr: =?us-ascii?q?9a23=3AnUMU0RHBn1atFatkeM72TZ1GYnF86YWxBRYc798d?= =?us-ascii?q?s5kLTJ75osywAkXT6L1XgUPTWs2DsrQf2rKQ7/qrADVRqb+681k6OKRWUBEEjc?= =?us-ascii?q?hE1ycBO+WiTXPBEfjxciYhF95DXlI2t1uyMExSBdqsLwaK+i760zceF13FOBZv?= =?us-ascii?q?IaytQ8iJ3pzxi7r5osSCKyxzxxOFKYtoKxu3qQiD/uI3uqBFbpgL9x3Sv3FTcP?= =?us-ascii?q?5Xz247bXianhL7+9vitMU7q3cYk7sb+sVBSaT3ebgjBfwdVWx+cjN92Mq+rhTH?= =?us-ascii?q?TA2S9lMAQ24WlVxOGAGD4xbkDbnrtS6vqet53CiTOIv9C6ozUzm487xDSRn0hS?= =?us-ascii?q?NBPDk8ozKfsdB5kK8O+EHpnBd42YOBJdjNbPc=3D?= X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: =?us-ascii?q?A0HOBgBX54dX/yNjr8ZcHAEBgyCBUqZij?= =?us-ascii?q?3uEChKGB4E1TAEBAQEBAQICYieCMgQBEgGCQFIwgSGIMMEtAQsliCqGXXyFDwW?= =?us-ascii?q?OfIojjlkCjy0CkBlUggkcgWwcMgGGKYFEAQEB?= X-IPAS-Result: =?us-ascii?q?A0HOBgBX54dX/yNjr8ZcHAEBgyCBUqZij3uEChKGB4E1TAE?= =?us-ascii?q?BAQEBAQICYieCMgQBEgGCQFIwgSGIMMEtAQsliCqGXXyFDwWOfIojjlkCjy0Ck?= =?us-ascii?q?BlUggkcgWwcMgGGKYFEAQEB?= X-IronPort-AV: E=Sophos;i="5.28,364,1464652800"; d="scan'208";a="17661695" Received: from fmsmga002-icc.fm.intel.com ([198.175.99.35]) by emsm-gh1-uea11.nsa.gov with ESMTP; 14 Jul 2016 19:29:26 +0000 Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga002-icc.fm.intel.com with ESMTP; 14 Jul 2016 12:29:27 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.28,364,1464678000"; d="scan'208";a="846447139" Received: from wcrobert-mobl1.jf.intel.com ([10.24.0.129]) by orsmga003.jf.intel.com with ESMTP; 14 Jul 2016 12:29:27 -0700 From: william.c.roberts@intel.com To: selinux@tycho.nsa.gov Subject: [PATCH] selinux: print leading 0x on ioctlcmd audits Date: Thu, 14 Jul 2016 12:29:22 -0700 Message-Id: <1468524562-30981-1-git-send-email-william.c.roberts@intel.com> X-Mailer: git-send-email 1.9.1 X-BeenThere: selinux@tycho.nsa.gov X-Mailman-Version: 2.1.20 Precedence: list List-Id: "Security-Enhanced Linux \(SELinux\) mailing list" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: seandroid-list@tycho.nsa.gov, sds@tycho.nsa.gov MIME-Version: 1.0 Errors-To: selinux-bounces@tycho.nsa.gov Sender: "Selinux" X-Virus-Scanned: ClamAV using ClamSMTP From: William Roberts 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 --- 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: {