mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-02 15:18:19 +00:00
apparmor: Fix failed mount permission check error message
commitec240b5905
upstream. When the mount check fails due to a permission check failure instead of explicitly at one of the subcomponent checks, AppArmor is reporting a failure in the flags match. However this is not true and AppArmor can not attribute the error at this point to any particular component, and should only indicate the mount failed due to missing permissions. Fixes:2ea3ffb778
("apparmor: add mount mediation") Signed-off-by: John Johansen <john.johansen@canonical.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
0828d1db5b
commit
1fff357ea6
1 changed files with 4 additions and 3 deletions
|
@ -233,7 +233,8 @@ static const char * const mnt_info_table[] = {
|
|||
"failed srcname match",
|
||||
"failed type match",
|
||||
"failed flags match",
|
||||
"failed data match"
|
||||
"failed data match",
|
||||
"failed perms check"
|
||||
};
|
||||
|
||||
/*
|
||||
|
@ -288,8 +289,8 @@ static int do_match_mnt(struct aa_dfa *dfa, unsigned int start,
|
|||
return 0;
|
||||
}
|
||||
|
||||
/* failed at end of flags match */
|
||||
return 4;
|
||||
/* failed at perms check, don't confuse with flags match */
|
||||
return 6;
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue