[PATCH] audit inode for all xattr syscalls
authorAmy Griffis <amy.griffis@hp.com>
Tue, 13 Feb 2007 19:14:41 +0000 (14:14 -0500)
committerAl Viro <viro@zeniv.linux.org.uk>
Fri, 11 May 2007 09:38:26 +0000 (05:38 -0400)
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>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
fs/xattr.c

index 9f4568b55b0f1b1232c6b1c4ec1592c0486a53e4..4523aca79659c24f5d2ca3b8ee415ddd9588b73f 100644 (file)
@@ -350,6 +350,7 @@ sys_fgetxattr(int fd, char __user *name, void __user *value, size_t size)
        f = fget(fd);
        if (!f)
                return error;
+       audit_inode(NULL, f->f_path.dentry->d_inode);
        error = getxattr(f->f_path.dentry, name, value, size);
        fput(f);
        return error;
@@ -422,6 +423,7 @@ sys_flistxattr(int fd, char __user *list, size_t size)
        f = fget(fd);
        if (!f)
                return error;
+       audit_inode(NULL, f->f_path.dentry->d_inode);
        error = listxattr(f->f_path.dentry, list, size);
        fput(f);
        return error;