UBUNTU: SAUCE: apparmor4.0.0 [75/90]: apparmor: remove redundant unconfined check.
BugLink: http://bugs.launchpad.net/bugs/2028253 profile_af_perm and profile_af_sk_perm are only ever called after checking that the profile is not unconfined. Signed-off-by: John Johansen <john.johansen@canonical.com> (cherry picked from commit 47a4d61cc235c957e264e9f12fd126ed8e012a23 https://git.launchpad.net/~apparmor-dev/ubuntu-kernel-next) Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
This commit is contained in:
committed by
Paolo Pisati
parent
0cebc3cce5
commit
f71ac63249
@@ -173,9 +173,8 @@ int aa_profile_af_perm(struct aa_profile *profile,
|
||||
|
||||
AA_BUG(family >= AF_MAX);
|
||||
AA_BUG(type < 0 || type >= SOCK_MAX);
|
||||
AA_BUG(profile_unconfined(profile));
|
||||
|
||||
if (profile_unconfined(profile))
|
||||
return 0;
|
||||
state = RULE_MEDIATES(rules, AA_CLASS_NET);
|
||||
if (state) {
|
||||
buffer[0] = cpu_to_be16(family);
|
||||
|
||||
Reference in New Issue
Block a user