Преглед изворни кода

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: John Johansen <john.johansen@canonical.com>
John Johansen пре 13 година
родитељ
комит
ef9a762279
1 измењених фајлова са 1 додато и 1 уклоњено
  1. 1 1
      security/apparmor/path.c

+ 1 - 1
security/apparmor/path.c

@@ -137,7 +137,7 @@ ok:
 			/* disconnected path, don't return pathname starting
 			 * with '/'
 			 */
-			error = -ESTALE;
+			error = -EACCES;
 			if (*res == '/')
 				*name = res + 1;
 		}