Skip to content

Commit 8a6a03a

Browse files
committed
Merge tag 'lsm-pr-20241129' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/lsm
Pull ima fix from Paul Moore: "One small patch to fix a function parameter / local variable naming snafu that went up to you in the current merge window" * tag 'lsm-pr-20241129' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/lsm: ima: uncover hidden variable in ima_match_rules()
2 parents cfd4730 + a65d9d1 commit 8a6a03a

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

security/integrity/ima/ima_policy.c

+5-4
Original file line numberDiff line numberDiff line change
@@ -635,7 +635,7 @@ static bool ima_match_rules(struct ima_rule_entry *rule,
635635
return false;
636636
for (i = 0; i < MAX_LSM_RULES; i++) {
637637
int rc = 0;
638-
struct lsm_prop prop = { };
638+
struct lsm_prop inode_prop = { };
639639

640640
if (!lsm_rule->lsm[i].rule) {
641641
if (!lsm_rule->lsm[i].args_p)
@@ -649,15 +649,16 @@ static bool ima_match_rules(struct ima_rule_entry *rule,
649649
case LSM_OBJ_USER:
650650
case LSM_OBJ_ROLE:
651651
case LSM_OBJ_TYPE:
652-
security_inode_getlsmprop(inode, &prop);
653-
rc = ima_filter_rule_match(&prop, lsm_rule->lsm[i].type,
652+
security_inode_getlsmprop(inode, &inode_prop);
653+
rc = ima_filter_rule_match(&inode_prop,
654+
lsm_rule->lsm[i].type,
654655
Audit_equal,
655656
lsm_rule->lsm[i].rule);
656657
break;
657658
case LSM_SUBJ_USER:
658659
case LSM_SUBJ_ROLE:
659660
case LSM_SUBJ_TYPE:
660-
rc = ima_filter_rule_match(&prop, lsm_rule->lsm[i].type,
661+
rc = ima_filter_rule_match(prop, lsm_rule->lsm[i].type,
661662
Audit_equal,
662663
lsm_rule->lsm[i].rule);
663664
break;

0 commit comments

Comments
 (0)