From: "George C. Wilson" Subject: [PATCH] Audit of POSIX Message Queue Syscalls Userspace Date: Tue, 16 May 2006 20:42:39 -0500 Message-ID: <20060517014239.GB16852@us.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from mx3.redhat.com (mx3.redhat.com [172.16.48.32]) by int-mx1.corp.redhat.com (8.12.11.20060308/8.12.11) with ESMTP id k4H1h0BT024420 for ; Tue, 16 May 2006 21:43:00 -0400 Received: from e36.co.us.ibm.com (e36.co.us.ibm.com [32.97.110.154]) by mx3.redhat.com (8.13.1/8.13.1) with ESMTP id k4H1gpu6008469 for ; Tue, 16 May 2006 21:42:52 -0400 Received: from d03relay04.boulder.ibm.com (d03relay04.boulder.ibm.com [9.17.195.106]) by e36.co.us.ibm.com (8.12.11.20060308/8.12.11) with ESMTP id k4H1geAY022362 for ; Tue, 16 May 2006 21:42:40 -0400 Received: from d03av02.boulder.ibm.com (d03av02.boulder.ibm.com [9.17.195.168]) by d03relay04.boulder.ibm.com (8.12.10/NCO/VER6.8) with ESMTP id k4H1geV1185744 for ; Tue, 16 May 2006 19:42:40 -0600 Received: from d03av02.boulder.ibm.com (loopback [127.0.0.1]) by d03av02.boulder.ibm.com (8.12.11/8.13.3) with ESMTP id k4H1genN012770 for ; Tue, 16 May 2006 19:42:40 -0600 Received: from us.ibm.com (ea.austin.ibm.com [9.53.40.26]) by d03av02.boulder.ibm.com (8.12.11/8.12.11) with ESMTP id k4H1gexK012766 for ; Tue, 16 May 2006 19:42:40 -0600 Received: (from gcwilson@localhost) by us.ibm.com (8.13.4/8.13.4/Submit) id k4H1gdb2016955 for linux-audit@redhat.com; Tue, 16 May 2006 20:42:39 -0500 Content-Disposition: inline List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-audit-bounces@redhat.com Errors-To: linux-audit-bounces@redhat.com To: linux-audit@redhat.com List-Id: linux-audit@redhat.com This patch adds identifiers for the POSIX MQ auxiliary records. It applies cleanly to audit-1.2.2. The constants are conditionally #define'd in lib/libaudit.h, and the messages themselves in lib/msg_typetab.h. Not sure what the expectation is for new #defines--/usr/include/linux/audit.h or lib/libaudit.h. But chose the latter with the sort of preprocessor conditionals I saw in use in some of the other groups of defines. So it doesn't care about audit.h one way or the other. Please apply when kernel work is ready. libaudit.h | 6 ++++++ msg_typetab.h | 4 ++++ 2 files changed, 10 insertions(+) Signed-off-by: George Wilson -- diff -Naurp audit-1.2.2.orig/lib/libaudit.h audit-1.2.2/lib/libaudit.h --- audit-1.2.2.orig/lib/libaudit.h 2006-05-12 12:56:55.000000000 -0500 +++ audit-1.2.2/lib/libaudit.h 2006-05-16 18:12:14.000000000 -0500 @@ -96,6 +96,12 @@ extern "C" { #ifndef AUDIT_IPC_SET_PERM #define AUDIT_IPC_SET_PERM 1311 /* IPC new permissions record type */ #endif +#ifndef AUDIT_MQ_OPEN +#define AUDIT_MQ_OPEN 1312 /* POSIX MQ open record type */ +#define AUDIT_MQ_SENDRECV 1313 /* POSIX MQ send/receive record type */ +#define AUDIT_MQ_NOTIFY 1314 /* POSIX MQ notify record type */ +#define AUDIT_MQ_GETSETATTR 1315 /* POSIX MQ get/set attribute record type */ +#endif #define AUDIT_LAST_EVENT 1399 #define AUDIT_FIRST_SELINUX 1400 diff -Naurp audit-1.2.2.orig/lib/msg_typetab.h audit-1.2.2/lib/msg_typetab.h --- audit-1.2.2.orig/lib/msg_typetab.h 2006-05-12 12:08:28.000000000 -0500 +++ audit-1.2.2/lib/msg_typetab.h 2006-05-16 18:12:14.000000000 -0500 @@ -77,6 +77,10 @@ _S(AUDIT_FS_INODE, "FS _S(AUDIT_EXECVE, "EXECVE" ) _S(AUDIT_SYSCALL_PARTIAL, "SYSCALL_PARTIAL" ) _S(AUDIT_IPC_SET_PERM, "IPC_SET_PERM" ) +_S(AUDIT_MQ_OPEN, "MQ_OPEN" ) +_S(AUDIT_MQ_SENDRECV, "MQ_SENDRECV" ) +_S(AUDIT_MQ_NOTIFY, "MQ_NOTIFY" ) +_S(AUDIT_MQ_GETSETATTR, "MQ_GETSETATTR" ) _S(AUDIT_AVC, "AVC" ) _S(AUDIT_SELINUX_ERR, "SELINUX_ERR" ) _S(AUDIT_AVC_PATH, "AVC_PATH" ) -- George Wilson IBM Linux Technology Center