Skip to content

Commit e573cc3

Browse files
committed
apparmor: fix error code to failure message mapping for name lookup
-ESTALE used to be incorrectly used to indicate a disconnected path, when name lookup failed. This was fixed in commit e1b0e444 to correctly return -EACCESS, but the error to failure message mapping was not correctly updated to reflect this change. Signed-off-by: John Johansen <john.johansen@canonical.com> Acked-by: Steve Beattie <sbeattie@ubuntu.com>
1 parent 50c5ecd commit e573cc3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

security/apparmor/path.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ static int get_name_to_buffer(struct path *path, int flags, char *buffer,
174174
if (info && error) {
175175
if (error == -ENOENT)
176176
*info = "Failed name lookup - deleted entry";
177-
else if (error == -ESTALE)
177+
else if (error == -EACCES)
178178
*info = "Failed name lookup - disconnected path";
179179
else if (error == -ENAMETOOLONG)
180180
*info = "Failed name lookup - name too long";

0 commit comments

Comments
 (0)