From mboxrd@z Thu Jan 1 00:00:00 1970 From: Amy Griffis Subject: [PATCH] log obj label when opening an existing mq Date: Tue, 23 Jan 2007 19:07:37 -0500 Message-ID: <20070124000737.GA22272@fc.hp.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Return-path: Received: from mx1.redhat.com (mx1.redhat.com [172.16.48.31]) by int-mx1.corp.redhat.com (8.13.1/8.13.1) with ESMTP id l0O07rrv010041 for ; Tue, 23 Jan 2007 19:07:53 -0500 Received: from atlrel9.hp.com (atlrel9.hp.com [156.153.255.214]) by mx1.redhat.com (8.12.11.20060308/8.12.11) with ESMTP id l0O07pML010596 for ; Tue, 23 Jan 2007 19:07:51 -0500 Received: from smtp2.fc.hp.com (smtp2.fc.hp.com [15.11.136.114]) by atlrel9.hp.com (Postfix) with ESMTP id 297E134C23 for ; Tue, 23 Jan 2007 19:07:46 -0500 (EST) Received: from ldl.fc.hp.com (ldl.fc.hp.com [15.11.146.30]) by smtp2.fc.hp.com (Postfix) with ESMTP id 03E691671F8 for ; Wed, 24 Jan 2007 00:07:46 +0000 (UTC) Received: from localhost (ldl.lart [127.0.0.1]) by ldl.fc.hp.com (Postfix) with ESMTP id B452D39C005 for ; Tue, 23 Jan 2007 17:07:45 -0700 (MST) Received: from ldl.fc.hp.com ([127.0.0.1]) by localhost (ldl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 25710-05 for ; Tue, 23 Jan 2007 17:07:41 -0700 (MST) 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 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 --- diff -Nrup linux-2.6.18.x86_64/ipc/mqueue.c linux-2.6.18.x86_64-amg/ipc/mqueue.c --- linux-2.6.18.x86_64/ipc/mqueue.c 2007-01-23 17:17:06.000000000 -0500 +++ linux-2.6.18.x86_64-amg/ipc/mqueue.c 2007-01-23 18:25:25.000000000 -0500 @@ -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);