Lines Matching refs:lsm
80 } lsm[MAX_LSM_RULES]; member
257 ima_filter_rule_free(entry->lsm[i].rule); in ima_lsm_free_rule()
258 kfree(entry->lsm[i].args_p); in ima_lsm_free_rule()
277 memset(nentry->lsm, 0, FIELD_SIZEOF(struct ima_rule_entry, lsm)); in ima_lsm_copy_rule()
280 if (!entry->lsm[i].args_p) in ima_lsm_copy_rule()
283 nentry->lsm[i].type = entry->lsm[i].type; in ima_lsm_copy_rule()
284 nentry->lsm[i].args_p = kstrdup(entry->lsm[i].args_p, in ima_lsm_copy_rule()
286 if (!nentry->lsm[i].args_p) in ima_lsm_copy_rule()
289 ima_filter_rule_init(nentry->lsm[i].type, Audit_equal, in ima_lsm_copy_rule()
290 nentry->lsm[i].args_p, in ima_lsm_copy_rule()
291 &nentry->lsm[i].rule); in ima_lsm_copy_rule()
292 if (!nentry->lsm[i].rule) in ima_lsm_copy_rule()
294 (char *)entry->lsm[i].args_p); in ima_lsm_copy_rule()
331 if (entry->lsm[i].args_p) { in ima_lsm_update_rules()
419 if (!lsm_rule->lsm[i].rule) { in ima_match_rules()
420 if (!lsm_rule->lsm[i].args_p) in ima_match_rules()
432 rc = ima_filter_rule_match(osid, lsm_rule->lsm[i].type, in ima_match_rules()
434 lsm_rule->lsm[i].rule); in ima_match_rules()
439 rc = ima_filter_rule_match(secid, lsm_rule->lsm[i].type, in ima_match_rules()
441 lsm_rule->lsm[i].rule); in ima_match_rules()
464 ima_filter_rule_free(lsm_rule->lsm[i].rule); in ima_match_rules()
839 if (entry->lsm[lsm_rule].rule) in ima_lsm_rule_init()
842 entry->lsm[lsm_rule].args_p = match_strdup(args); in ima_lsm_rule_init()
843 if (!entry->lsm[lsm_rule].args_p) in ima_lsm_rule_init()
846 entry->lsm[lsm_rule].type = audit_type; in ima_lsm_rule_init()
847 result = ima_filter_rule_init(entry->lsm[lsm_rule].type, Audit_equal, in ima_lsm_rule_init()
848 entry->lsm[lsm_rule].args_p, in ima_lsm_rule_init()
849 &entry->lsm[lsm_rule].rule); in ima_lsm_rule_init()
850 if (!entry->lsm[lsm_rule].rule) { in ima_lsm_rule_init()
852 (char *)entry->lsm[lsm_rule].args_p); in ima_lsm_rule_init()
855 kfree(entry->lsm[lsm_rule].args_p); in ima_lsm_rule_init()
1327 kfree(entry->lsm[i].args_p); in ima_delete_rules()
1409 if (entry->lsm[i].args_p && !entry->lsm[i].rule) { in ima_policy_show()
1506 if (entry->lsm[i].rule) { in ima_policy_show()
1510 (char *)entry->lsm[i].args_p); in ima_policy_show()
1514 (char *)entry->lsm[i].args_p); in ima_policy_show()
1518 (char *)entry->lsm[i].args_p); in ima_policy_show()
1522 (char *)entry->lsm[i].args_p); in ima_policy_show()
1526 (char *)entry->lsm[i].args_p); in ima_policy_show()
1530 (char *)entry->lsm[i].args_p); in ima_policy_show()