提交 ef9a7622 编写于 作者: J John Johansen

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: NJohn Johansen <john.johansen@canonical.com>
上级 f67dabbd
......@@ -137,7 +137,7 @@ static int d_namespace_path(struct path *path, char *buf, int buflen,
/* disconnected path, don't return pathname starting
* with '/'
*/
error = -ESTALE;
error = -EACCES;
if (*res == '/')
*name = res + 1;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册