From: Amy Griffis <amy.griffis@hp.com>
To: linux-audit@redhat.com
Subject: [PATCH 2/4] audit inode for all xattr syscalls
Date: Tue, 13 Feb 2007 14:14:41 -0500 [thread overview]
Message-ID: <20070213191441.GC7536@fc.hp.com> (raw)
In-Reply-To: <20070213191308.GA7536@fc.hp.com>
Collect inode info for the remaining xattr syscalls that operate on a file
descriptor. These don't call a path_lookup variant, so they aren't covered by
the general audit hook.
Signed-off-by: Amy Griffis <amy.griffis@hp.com>
---
fs/xattr.c | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/fs/xattr.c b/fs/xattr.c
index 3864613..4f21fc9 100644
--- a/fs/xattr.c
+++ b/fs/xattr.c
@@ -346,11 +346,14 @@ asmlinkage ssize_t
sys_fgetxattr(int fd, char __user *name, void __user *value, size_t size)
{
struct file *f;
+ struct dentry *dentry;
ssize_t error = -EBADF;
f = fget(fd);
if (!f)
return error;
+ dentry = f->f_path.dentry;
+ audit_inode(NULL, dentry->d_inode);
error = getxattr(f->f_path.dentry, name, value, size);
fput(f);
return error;
@@ -418,11 +421,14 @@ asmlinkage ssize_t
sys_flistxattr(int fd, char __user *list, size_t size)
{
struct file *f;
+ struct dentry *dentry;
ssize_t error = -EBADF;
f = fget(fd);
if (!f)
return error;
+ dentry = f->f_path.dentry;
+ audit_inode(NULL, dentry->d_inode);
error = listxattr(f->f_path.dentry, list, size);
fput(f);
return error;
--
1.4.4.4
next prev parent reply other threads:[~2007-02-13 19:17 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-02-13 19:13 [PATCH 0/4] audit obj cleanups Amy Griffis
2007-02-13 19:14 ` [PATCH 1/4] initialize name osid Amy Griffis
2007-02-13 19:14 ` Amy Griffis [this message]
2007-02-13 19:15 ` [PATCH 3/4] complete message queue auditing Amy Griffis
2007-02-13 19:15 ` [PATCH 4/4] match audit name data Amy Griffis
2007-02-14 18:08 ` Amy Griffis
2007-03-17 23:02 ` Steve Grubb
2007-03-19 7:24 ` Alexander Viro
-- strict thread matches above, loose matches on Subject: below --
2007-03-19 20:43 [PATCH 1/4] initialize name osid Amy Griffis
2007-03-19 20:42 ` [PATCH 0/4] audit obj cleanups Amy Griffis
2007-03-19 20:43 ` [PATCH 2/4] audit inode for all xattr syscalls Amy Griffis
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=20070213191441.GC7536@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox