Lines Matching refs:entry

21  * ima_free_template_entry - free an existing template entry
23 void ima_free_template_entry(struct ima_template_entry *entry)
27 for (i = 0; i < entry->template_desc->num_fields; i++)
28 kfree(entry->template_data[i].data);
30 kfree(entry->digests);
31 kfree(entry);
35 * ima_alloc_init_template - create and initialize a new template entry
38 struct ima_template_entry **entry,
50 *entry = kzalloc(struct_size(*entry, template_data,
52 if (!*entry)
58 kfree(*entry);
59 *entry = NULL;
63 (*entry)->digests = digests;
64 (*entry)->template_desc = template_desc;
71 &((*entry)->template_data[i]));
75 len = (*entry)->template_data[i].len;
76 (*entry)->template_data_len += sizeof(len);
77 (*entry)->template_data_len += len;
81 ima_free_template_entry(*entry);
82 *entry = NULL;
89 * Calculate the hash of a template entry, add the template entry
102 int ima_store_template(struct ima_template_entry *entry,
108 char *template_name = entry->template_desc->name;
112 result = ima_calc_field_array_hash(&entry->template_data[0],
113 entry);
121 entry->pcr = pcr;
122 result = ima_add_template_entry(entry, violation, op, inode, filename);
137 struct ima_template_entry *entry;
149 result = ima_alloc_init_template(&event_data, &entry, NULL);
154 result = ima_store_template(entry, violation, inode,
157 ima_free_template_entry(entry);
351 struct ima_template_entry *entry;
369 result = ima_alloc_init_template(&event_data, &entry, template_desc);
376 result = ima_store_template(entry, violation, inode, filename, pcr);
382 ima_free_template_entry(entry);