Commit 46b9b994 authored by John Johansen's avatar John Johansen
Browse files

apparmor: remove redundant unconfined check.



profile_af_perm and profile_af_sk_perm are only ever called after
checking that the profile is not unconfined. So we can drop these
redundant checks.

Signed-off-by: default avatarJohn Johansen <john.johansen@canonical.com>
parent 280799f7
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -118,9 +118,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)
		return 0;