Lines Matching refs:i
254 int i; in ima_lsm_free_rule() local
256 for (i = 0; i < MAX_LSM_RULES; i++) { in ima_lsm_free_rule()
257 kfree(entry->lsm[i].rule); in ima_lsm_free_rule()
258 kfree(entry->lsm[i].args_p); in ima_lsm_free_rule()
266 int i, result; in ima_lsm_copy_rule() local
279 for (i = 0; i < MAX_LSM_RULES; i++) { in ima_lsm_copy_rule()
280 if (!entry->lsm[i].rule) 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 result = security_filter_rule_init(nentry->lsm[i].type, in ima_lsm_copy_rule()
291 nentry->lsm[i].args_p, in ima_lsm_copy_rule()
292 &nentry->lsm[i].rule); in ima_lsm_copy_rule()
295 entry->lsm[i].type); in ima_lsm_copy_rule()
327 int i, result, needs_update; in ima_lsm_update_rules() local
331 for (i = 0; i < MAX_LSM_RULES; i++) { in ima_lsm_update_rules()
332 if (entry->lsm[i].rule) { in ima_lsm_update_rules()
374 int i; in ima_match_rules() local
414 for (i = 0; i < MAX_LSM_RULES; i++) { in ima_match_rules()
418 if (!rule->lsm[i].rule) in ima_match_rules()
421 switch (i) { in ima_match_rules()
427 rule->lsm[i].type, in ima_match_rules()
429 rule->lsm[i].rule); in ima_match_rules()
435 rule->lsm[i].type, in ima_match_rules()
437 rule->lsm[i].rule); in ima_match_rules()
575 int i = 0; in add_rules() local
577 for (i = 0; i < count; i++) { in add_rules()
581 list_add_tail(&entries[i].list, &ima_default_rules); in add_rules()
584 entry = kmemdup(&entries[i], sizeof(*entry), in add_rules()
591 if (entries[i].action == APPRAISE) { in add_rules()
592 temp_ima_appraise |= ima_appraise_flag(entries[i].func); in add_rules()
593 if (entries[i].func == POLICY_CHECK) in add_rules()
606 int i = 0; in ima_init_arch_policy() local
622 for (rules = arch_rules, i = 0; *rules != NULL; rules++) { in ima_init_arch_policy()
628 INIT_LIST_HEAD(&arch_policy_entry[i].list); in ima_init_arch_policy()
629 result = ima_parse_rule(rule, &arch_policy_entry[i]); in ima_init_arch_policy()
633 memset(&arch_policy_entry[i], 0, in ima_init_arch_policy()
637 i++; in ima_init_arch_policy()
639 return i; in ima_init_arch_policy()
862 int i; in check_template_modsig() local
869 for (i = 0; i < template->num_fields; i++) { in check_template_modsig()
870 if (!strcmp(template->fields[i]->field_id, "modsig")) in check_template_modsig()
872 else if (!strcmp(template->fields[i]->field_id, "d-modsig")) in check_template_modsig()
1290 int i; in ima_delete_rules() local
1294 for (i = 0; i < MAX_LSM_RULES; i++) in ima_delete_rules()
1295 kfree(entry->lsm[i].args_p); in ima_delete_rules()
1369 int i; in ima_policy_show() local
1465 for (i = 0; i < MAX_LSM_RULES; i++) { in ima_policy_show()
1466 if (entry->lsm[i].rule) { in ima_policy_show()
1467 switch (i) { in ima_policy_show()
1470 (char *)entry->lsm[i].args_p); in ima_policy_show()
1474 (char *)entry->lsm[i].args_p); in ima_policy_show()
1478 (char *)entry->lsm[i].args_p); in ima_policy_show()
1482 (char *)entry->lsm[i].args_p); in ima_policy_show()
1486 (char *)entry->lsm[i].args_p); in ima_policy_show()
1490 (char *)entry->lsm[i].args_p); in ima_policy_show()