aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/auditsc.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/auditsc.c')
-rw-r--r--kernel/auditsc.c15
1 files changed, 4 insertions, 11 deletions
diff --git a/kernel/auditsc.c b/kernel/auditsc.c
index dc4ae70a7413..9fb9d1cb83ce 100644
--- a/kernel/auditsc.c
+++ b/kernel/auditsc.c
@@ -1629,7 +1629,7 @@ retry:
1629 rcu_read_lock(); 1629 rcu_read_lock();
1630 seq = read_seqbegin(&rename_lock); 1630 seq = read_seqbegin(&rename_lock);
1631 for(;;) { 1631 for(;;) {
1632 struct inode *inode = d->d_inode; 1632 struct inode *inode = d_backing_inode(d);
1633 if (inode && unlikely(!hlist_empty(&inode->i_fsnotify_marks))) { 1633 if (inode && unlikely(!hlist_empty(&inode->i_fsnotify_marks))) {
1634 struct audit_chunk *chunk; 1634 struct audit_chunk *chunk;
1635 chunk = audit_tree_lookup(inode); 1635 chunk = audit_tree_lookup(inode);
@@ -1754,7 +1754,7 @@ void __audit_inode(struct filename *name, const struct dentry *dentry,
1754 unsigned int flags) 1754 unsigned int flags)
1755{ 1755{
1756 struct audit_context *context = current->audit_context; 1756 struct audit_context *context = current->audit_context;
1757 const struct inode *inode = dentry->d_inode; 1757 const struct inode *inode = d_backing_inode(dentry);
1758 struct audit_names *n; 1758 struct audit_names *n;
1759 bool parent = flags & AUDIT_INODE_PARENT; 1759 bool parent = flags & AUDIT_INODE_PARENT;
1760 1760
@@ -1853,7 +1853,7 @@ void __audit_inode_child(const struct inode *parent,
1853 const unsigned char type) 1853 const unsigned char type)
1854{ 1854{
1855 struct audit_context *context = current->audit_context; 1855 struct audit_context *context = current->audit_context;
1856 const struct inode *inode = dentry->d_inode; 1856 const struct inode *inode = d_backing_inode(dentry);
1857 const char *dname = dentry->d_name.name; 1857 const char *dname = dentry->d_name.name;
1858 struct audit_names *n, *found_parent = NULL, *found_child = NULL; 1858 struct audit_names *n, *found_parent = NULL, *found_child = NULL;
1859 1859
@@ -2361,7 +2361,6 @@ static void audit_log_task(struct audit_buffer *ab)
2361 kuid_t auid, uid; 2361 kuid_t auid, uid;
2362 kgid_t gid; 2362 kgid_t gid;
2363 unsigned int sessionid; 2363 unsigned int sessionid;
2364 struct mm_struct *mm = current->mm;
2365 char comm[sizeof(current->comm)]; 2364 char comm[sizeof(current->comm)];
2366 2365
2367 auid = audit_get_loginuid(current); 2366 auid = audit_get_loginuid(current);
@@ -2376,13 +2375,7 @@ static void audit_log_task(struct audit_buffer *ab)
2376 audit_log_task_context(ab); 2375 audit_log_task_context(ab);
2377 audit_log_format(ab, " pid=%d comm=", task_pid_nr(current)); 2376 audit_log_format(ab, " pid=%d comm=", task_pid_nr(current));
2378 audit_log_untrustedstring(ab, get_task_comm(comm, current)); 2377 audit_log_untrustedstring(ab, get_task_comm(comm, current));
2379 if (mm) { 2378 audit_log_d_path_exe(ab, current->mm);
2380 down_read(&mm->mmap_sem);
2381 if (mm->exe_file)
2382 audit_log_d_path(ab, " exe=", &mm->exe_file->f_path);
2383 up_read(&mm->mmap_sem);
2384 } else
2385 audit_log_format(ab, " exe=(null)");
2386} 2379}
2387 2380
2388/** 2381/**