aboutsummaryrefslogtreecommitdiffstats
path: root/security/apparmor/path.c
diff options
context:
space:
mode:
authorJohn Johansen <john.johansen@canonical.com>2012-03-10 14:19:51 -0500
committerJohn Johansen <john.johansen@canonical.com>2012-03-14 09:14:52 -0400
commitef9a762279c9ce98c592fb144b31898411feb94d (patch)
tree4cb159b99e792781af212324aee7c8be4b549c38 /security/apparmor/path.c
parentf67dabbdde1fe112dfff05d02890f1e0d54117a8 (diff)
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>
Diffstat (limited to 'security/apparmor/path.c')
-rw-r--r--security/apparmor/path.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/security/apparmor/path.c b/security/apparmor/path.c
index c31ce837fef4..3dd605c69970 100644
--- a/security/apparmor/path.c
+++ b/security/apparmor/path.c
@@ -137,7 +137,7 @@ ok:
137 /* disconnected path, don't return pathname starting 137 /* disconnected path, don't return pathname starting
138 * with '/' 138 * with '/'
139 */ 139 */
140 error = -ESTALE; 140 error = -EACCES;
141 if (*res == '/') 141 if (*res == '/')
142 *name = res + 1; 142 *name = res + 1;
143 } 143 }