Commit 8936125e authored by Jiapeng Chong's avatar Jiapeng Chong Committed by John Johansen
Browse files

apparmor: Remove the unused variable rules



Variable rules is not effectively used, so delete it.

security/apparmor/lsm.c:182:23: warning: variable ‘rules’ set but not used.

Reported-by: default avatarAbaci Robot <abaci@linux.alibaba.com>
Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=22942


Signed-off-by: default avatarJiapeng Chong <jiapeng.chong@linux.alibaba.com>
Signed-off-by: default avatarJohn Johansen <john.johansen@canonical.com>
parent 4d9d1a08
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -179,10 +179,8 @@ static int apparmor_capget(const struct task_struct *target, kernel_cap_t *effec
		struct label_it i;

		label_for_each_confined(i, label, profile) {
			struct aa_ruleset *rules;
			kernel_cap_t allowed;

			rules = profile->label.rules[0];
			allowed = aa_profile_capget(profile);
			*effective = cap_intersect(*effective, allowed);
			*permitted = cap_intersect(*permitted, allowed);