18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0-only */ 28c2ecf20Sopenharmony_ci/* 38c2ecf20Sopenharmony_ci * Copyright (C) 2013 Politecnico di Torino, Italy 48c2ecf20Sopenharmony_ci * TORSEC group -- https://security.polito.it 58c2ecf20Sopenharmony_ci * 68c2ecf20Sopenharmony_ci * Author: Roberto Sassu <roberto.sassu@polito.it> 78c2ecf20Sopenharmony_ci * 88c2ecf20Sopenharmony_ci * File: ima_template_lib.h 98c2ecf20Sopenharmony_ci * Header for the library of supported template fields. 108c2ecf20Sopenharmony_ci */ 118c2ecf20Sopenharmony_ci#ifndef __LINUX_IMA_TEMPLATE_LIB_H 128c2ecf20Sopenharmony_ci#define __LINUX_IMA_TEMPLATE_LIB_H 138c2ecf20Sopenharmony_ci 148c2ecf20Sopenharmony_ci#include <linux/seq_file.h> 158c2ecf20Sopenharmony_ci#include "ima.h" 168c2ecf20Sopenharmony_ci 178c2ecf20Sopenharmony_ci#define ENFORCE_FIELDS 0x00000001 188c2ecf20Sopenharmony_ci#define ENFORCE_BUFEND 0x00000002 198c2ecf20Sopenharmony_ci 208c2ecf20Sopenharmony_civoid ima_show_template_digest(struct seq_file *m, enum ima_show_type show, 218c2ecf20Sopenharmony_ci struct ima_field_data *field_data); 228c2ecf20Sopenharmony_civoid ima_show_template_digest_ng(struct seq_file *m, enum ima_show_type show, 238c2ecf20Sopenharmony_ci struct ima_field_data *field_data); 248c2ecf20Sopenharmony_civoid ima_show_template_string(struct seq_file *m, enum ima_show_type show, 258c2ecf20Sopenharmony_ci struct ima_field_data *field_data); 268c2ecf20Sopenharmony_civoid ima_show_template_sig(struct seq_file *m, enum ima_show_type show, 278c2ecf20Sopenharmony_ci struct ima_field_data *field_data); 288c2ecf20Sopenharmony_civoid ima_show_template_buf(struct seq_file *m, enum ima_show_type show, 298c2ecf20Sopenharmony_ci struct ima_field_data *field_data); 308c2ecf20Sopenharmony_ciint ima_parse_buf(void *bufstartp, void *bufendp, void **bufcurp, 318c2ecf20Sopenharmony_ci int maxfields, struct ima_field_data *fields, int *curfields, 328c2ecf20Sopenharmony_ci unsigned long *len_mask, int enforce_mask, char *bufname); 338c2ecf20Sopenharmony_ciint ima_eventdigest_init(struct ima_event_data *event_data, 348c2ecf20Sopenharmony_ci struct ima_field_data *field_data); 358c2ecf20Sopenharmony_ciint ima_eventname_init(struct ima_event_data *event_data, 368c2ecf20Sopenharmony_ci struct ima_field_data *field_data); 378c2ecf20Sopenharmony_ciint ima_eventdigest_ng_init(struct ima_event_data *event_data, 388c2ecf20Sopenharmony_ci struct ima_field_data *field_data); 398c2ecf20Sopenharmony_ciint ima_eventdigest_modsig_init(struct ima_event_data *event_data, 408c2ecf20Sopenharmony_ci struct ima_field_data *field_data); 418c2ecf20Sopenharmony_ciint ima_eventname_ng_init(struct ima_event_data *event_data, 428c2ecf20Sopenharmony_ci struct ima_field_data *field_data); 438c2ecf20Sopenharmony_ciint ima_eventsig_init(struct ima_event_data *event_data, 448c2ecf20Sopenharmony_ci struct ima_field_data *field_data); 458c2ecf20Sopenharmony_ciint ima_eventbuf_init(struct ima_event_data *event_data, 468c2ecf20Sopenharmony_ci struct ima_field_data *field_data); 478c2ecf20Sopenharmony_ciint ima_eventmodsig_init(struct ima_event_data *event_data, 488c2ecf20Sopenharmony_ci struct ima_field_data *field_data); 498c2ecf20Sopenharmony_ci#endif /* __LINUX_IMA_TEMPLATE_LIB_H */ 50