All of lore.kernel.org
 help / color / mirror / Atom feed
From: Amy Griffis <amy.griffis@hp.com>
To: linux-audit@redhat.com
Subject: [PATCH] log obj label when opening an existing mq
Date: Tue, 23 Jan 2007 19:07:37 -0500	[thread overview]
Message-ID: <20070124000737.GA22272@fc.hp.com> (raw)

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 <amy.griffis@hp.com>
---
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);

                 reply	other threads:[~2007-01-24  0:07 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20070124000737.GA22272@fc.hp.com \
    --to=amy.griffis@hp.com \
    --cc=linux-audit@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.