log obj label when opening an existing mq
PATCH 1/1 log obj label when opening an existing mq
Add an audit_inode() hook to mq_open() so audit will log the object label for an existing POSIX message queue. Without this patch, audit only logs the object label when a new message queue is created.
Untested patch against lspp.63 kernel.
Signed-off-by Amy Griffis <[email protected]>
---
ipc/mqueue.c +1 -0
@@ -642,6 +642,7 @@ static int oflag2acc[O_ACCMODE] = { MAY_return ERR_PTR (-EINVAL ); } +audit_inode (dentry->d_name.name, dentry->d_inode);if (permission (dentry->d_inode, oflag2acc[oflag &O_ACCMODE ],NULL )) {dput (dentry);mntput (mqueue_mnt);