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

Commit ef9a7622 authored by John Johansen's avatar John Johansen
Browse files

AppArmor: Fix error returned when a path lookup is disconnected



The returning of -ESATLE when a path lookup fails as disconnected is wrong.
Since AppArmor is rejecting the access return -EACCES instead.

This also fixes a bug in complain (learning) mode where disconnected paths
are denied because -ESTALE errors are not ignored causing failures that
can change application behavior.

Signed-off-by: default avatarJohn Johansen <john.johansen@canonical.com>
parent f67dabbd
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -137,7 +137,7 @@ ok:
			/* disconnected path, don't return pathname starting
			 * with '/'
			 */
			error = -ESTALE;
			error = -EACCES;
			if (*res == '/')
				*name = res + 1;
		}