Skip to contentSkip to conversation

Audit of POSIX Message Queue Syscalls Userspace

PATCH New George C. Wilson 1 participant 1 message May 17, 2006 Library code

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Audit of POSIX Message Queue Syscalls Userspace

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(+)

--

lib/libaudit.h +6 -0
diff -Naurp audit-1.2.2.orig/lib/libaudit.h audit-1.2.2/lib/libaudit.h
@@ -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
lib/msg_typetab.h +4 -0
diff -Naurp audit-1.2.2.orig/lib/msg_typetab.h audit-1.2.2/lib/msg_typetab.h
@@ -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"                      )
Signature · 2 lines
George Wilson <[email protected]>
IBM Linux Technology Center