提交 53fc0e22 编写于 作者: M Mimi Zohar 提交者: James Morris

integrity: lsm audit rule matching fix

An audit subsystem change replaced AUDIT_EQUAL with Audit_equal.
Update calls to security_filter_rule_init()/match() to reflect
the change.
Signed-off-by: NMimi Zohar <zohar@us.ibm.com>
Signed-off-by: NJames Morris <jmorris@namei.org>
上级 78a3d9d5
...@@ -96,7 +96,7 @@ static bool ima_match_rules(struct ima_measure_rule_entry *rule, ...@@ -96,7 +96,7 @@ static bool ima_match_rules(struct ima_measure_rule_entry *rule,
if ((rule->flags & IMA_UID) && rule->uid != tsk->cred->uid) if ((rule->flags & IMA_UID) && rule->uid != tsk->cred->uid)
return false; return false;
for (i = 0; i < MAX_LSM_RULES; i++) { for (i = 0; i < MAX_LSM_RULES; i++) {
int rc; int rc = 0;
u32 osid, sid; u32 osid, sid;
if (!rule->lsm[i].rule) if (!rule->lsm[i].rule)
...@@ -109,7 +109,7 @@ static bool ima_match_rules(struct ima_measure_rule_entry *rule, ...@@ -109,7 +109,7 @@ static bool ima_match_rules(struct ima_measure_rule_entry *rule,
security_inode_getsecid(inode, &osid); security_inode_getsecid(inode, &osid);
rc = security_filter_rule_match(osid, rc = security_filter_rule_match(osid,
rule->lsm[i].type, rule->lsm[i].type,
AUDIT_EQUAL, Audit_equal,
rule->lsm[i].rule, rule->lsm[i].rule,
NULL); NULL);
break; break;
...@@ -119,7 +119,7 @@ static bool ima_match_rules(struct ima_measure_rule_entry *rule, ...@@ -119,7 +119,7 @@ static bool ima_match_rules(struct ima_measure_rule_entry *rule,
security_task_getsecid(tsk, &sid); security_task_getsecid(tsk, &sid);
rc = security_filter_rule_match(sid, rc = security_filter_rule_match(sid,
rule->lsm[i].type, rule->lsm[i].type,
AUDIT_EQUAL, Audit_equal,
rule->lsm[i].rule, rule->lsm[i].rule,
NULL); NULL);
default: default:
...@@ -227,7 +227,7 @@ static int ima_lsm_rule_init(struct ima_measure_rule_entry *entry, ...@@ -227,7 +227,7 @@ static int ima_lsm_rule_init(struct ima_measure_rule_entry *entry,
entry->lsm[lsm_rule].type = audit_type; entry->lsm[lsm_rule].type = audit_type;
result = security_filter_rule_init(entry->lsm[lsm_rule].type, result = security_filter_rule_init(entry->lsm[lsm_rule].type,
AUDIT_EQUAL, args, Audit_equal, args,
&entry->lsm[lsm_rule].rule); &entry->lsm[lsm_rule].rule);
return result; return result;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册