Skip to content

Commit

Permalink
AppArmor: Fix error returned when a path lookup is disconnected
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
John Johansen committed Mar 14, 2012
1 parent f67dabb commit ef9a762
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion security/apparmor/path.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit ef9a762

Please sign in to comment.