From: Amy Griffis Date: Tue, 13 Feb 2007 19:14:41 +0000 (-0500) Subject: [PATCH] audit inode for all xattr syscalls X-Git-Tag: MMI-PSA29.97-13-9~43175^2~3 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=510f4006e7a82b37b53c17bbe64ec20f3a59302b;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git [PATCH] audit inode for all xattr syscalls 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 Signed-off-by: Al Viro --- diff --git a/fs/xattr.c b/fs/xattr.c index 9f4568b55b0f..4523aca79659 100644 --- a/fs/xattr.c +++ b/fs/xattr.c @@ -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;