Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1c2e51e8 authored by Jeff Layton's avatar Jeff Layton Committed by Al Viro
Browse files

audit: pass in dentry to audit_copy_inode wherever possible



In some cases, we were passing in NULL even when we have a dentry.

Reported-by: default avatarEric Paris <eparis@redhat.com>
Signed-off-by: default avatarJeff Layton <jlayton@redhat.com>
Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
parent f78570dd
Loading
Loading
Loading
Loading
+2 −2
Original line number Original line Diff line number Diff line
@@ -2212,7 +2212,7 @@ void __audit_inode_child(const struct dentry *dentry,
		if (!strcmp(dname, n->name) ||
		if (!strcmp(dname, n->name) ||
		     !audit_compare_dname_path(dname, n->name, &dirlen)) {
		     !audit_compare_dname_path(dname, n->name, &dirlen)) {
			if (inode)
			if (inode)
				audit_copy_inode(n, NULL, inode);
				audit_copy_inode(n, dentry, inode);
			else
			else
				n->ino = (unsigned long)-1;
				n->ino = (unsigned long)-1;
			found_child = n->name;
			found_child = n->name;
@@ -2244,7 +2244,7 @@ void __audit_inode_child(const struct dentry *dentry,
		}
		}


		if (inode)
		if (inode)
			audit_copy_inode(n, NULL, inode);
			audit_copy_inode(n, dentry, inode);
	}
	}
}
}
EXPORT_SYMBOL_GPL(__audit_inode_child);
EXPORT_SYMBOL_GPL(__audit_inode_child);