]> git.karo-electronics.de Git - linux-beck.git/commit
audit: set the name_len in audit_inode for parent lookups
authorJeff Layton <jlayton@redhat.com>
Wed, 10 Oct 2012 19:25:23 +0000 (15:25 -0400)
committerAl Viro <viro@zeniv.linux.org.uk>
Fri, 12 Oct 2012 04:32:01 +0000 (00:32 -0400)
commitbfcec7087458812f575d9022b2d151641f34ee84
tree6c0f7dd3b016992da8d113ceeaae404c6abc03a1
parent78e2e802a8519031e5858595070b39713e26340d
audit: set the name_len in audit_inode for parent lookups

Currently, this gets set mostly by happenstance when we call into
audit_inode_child. While that might be a little more efficient, it seems
wrong. If the syscall ends up failing before audit_inode_child ever gets
called, then you'll have an audit_names record that shows the full path
but has the parent inode info attached.

Fix this by passing in a parent flag when we call audit_inode that gets
set to the value of LOOKUP_PARENT. We can then fix up the pathname for
the audit entry correctly from the get-go.

While we're at it, clean up the no-op macro for audit_inode in the
!CONFIG_AUDITSYSCALL case.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
fs/namei.c
fs/open.c
fs/xattr.c
include/linux/audit.h
ipc/mqueue.c
kernel/audit.h
kernel/auditfilter.c
kernel/auditsc.c