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:
John Johansen
2023-01-29 01:55:03 -08:00
committed by Paolo Pisati
parent 0cebc3cce5
commit f71ac63249
+1 -2
View File
@@ -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);