mirror of
https://github.com/torvalds/linux.git
synced 2026-07-27 01:32:21 +02:00
apparmor: don't audit files pointing to aa_null.dentry
In commit4a134723f9("apparmor: move check for aa_null file to cover all cases") there was a change to not audit files pointing to aa_null.dentry because they provide no value, but setting the error variable instead of returning -EACCES was still causing them to be audited. Fixes:4a134723f9("apparmor: move check for aa_null file to cover all cases") Acked-by: David Disseldorp <ddiss@suse.de> Signed-off-by: Georgia Garcia <georgia.garcia@canonical.com> Signed-off-by: John Johansen <john.johansen@canonical.com>
This commit is contained in:
parent
340372688b
commit
add2b70038
|
|
@ -157,7 +157,7 @@ static int path_name(const char *op, const struct cred *subj_cred,
|
|||
|
||||
/* don't reaudit files closed during inheritance */
|
||||
if (unlikely(path->dentry == aa_null.dentry))
|
||||
error = -EACCES;
|
||||
return -EACCES;
|
||||
else
|
||||
error = aa_path_name(path, flags, buffer, name, &info,
|
||||
labels_profile(label)->disconnected);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user