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

apparmor: Fix failed mount permission check error message

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: 2ea3ffb7 ("apparmor: add mount mediation")
Signed-off-by: NJohn Johansen <john.johansen@canonical.com>
上级 84117994
......@@ -229,7 +229,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"
};
/*
......@@ -284,8 +285,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;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册