162306a36Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0-only */ 262306a36Sopenharmony_ci/* 362306a36Sopenharmony_ci * Copyright (C) 2013 Politecnico di Torino, Italy 462306a36Sopenharmony_ci * TORSEC group -- https://security.polito.it 562306a36Sopenharmony_ci * 662306a36Sopenharmony_ci * Author: Roberto Sassu <roberto.sassu@polito.it> 762306a36Sopenharmony_ci * 862306a36Sopenharmony_ci * File: ima_template_lib.h 962306a36Sopenharmony_ci * Header for the library of supported template fields. 1062306a36Sopenharmony_ci */ 1162306a36Sopenharmony_ci#ifndef __LINUX_IMA_TEMPLATE_LIB_H 1262306a36Sopenharmony_ci#define __LINUX_IMA_TEMPLATE_LIB_H 1362306a36Sopenharmony_ci 1462306a36Sopenharmony_ci#include <linux/seq_file.h> 1562306a36Sopenharmony_ci#include "ima.h" 1662306a36Sopenharmony_ci 1762306a36Sopenharmony_ci#define ENFORCE_FIELDS 0x00000001 1862306a36Sopenharmony_ci#define ENFORCE_BUFEND 0x00000002 1962306a36Sopenharmony_ci 2062306a36Sopenharmony_civoid ima_show_template_digest(struct seq_file *m, enum ima_show_type show, 2162306a36Sopenharmony_ci struct ima_field_data *field_data); 2262306a36Sopenharmony_civoid ima_show_template_digest_ng(struct seq_file *m, enum ima_show_type show, 2362306a36Sopenharmony_ci struct ima_field_data *field_data); 2462306a36Sopenharmony_civoid ima_show_template_digest_ngv2(struct seq_file *m, enum ima_show_type show, 2562306a36Sopenharmony_ci struct ima_field_data *field_data); 2662306a36Sopenharmony_civoid ima_show_template_string(struct seq_file *m, enum ima_show_type show, 2762306a36Sopenharmony_ci struct ima_field_data *field_data); 2862306a36Sopenharmony_civoid ima_show_template_sig(struct seq_file *m, enum ima_show_type show, 2962306a36Sopenharmony_ci struct ima_field_data *field_data); 3062306a36Sopenharmony_civoid ima_show_template_buf(struct seq_file *m, enum ima_show_type show, 3162306a36Sopenharmony_ci struct ima_field_data *field_data); 3262306a36Sopenharmony_civoid ima_show_template_uint(struct seq_file *m, enum ima_show_type show, 3362306a36Sopenharmony_ci struct ima_field_data *field_data); 3462306a36Sopenharmony_ciint ima_parse_buf(void *bufstartp, void *bufendp, void **bufcurp, 3562306a36Sopenharmony_ci int maxfields, struct ima_field_data *fields, int *curfields, 3662306a36Sopenharmony_ci unsigned long *len_mask, int enforce_mask, char *bufname); 3762306a36Sopenharmony_ciint ima_eventdigest_init(struct ima_event_data *event_data, 3862306a36Sopenharmony_ci struct ima_field_data *field_data); 3962306a36Sopenharmony_ciint ima_eventname_init(struct ima_event_data *event_data, 4062306a36Sopenharmony_ci struct ima_field_data *field_data); 4162306a36Sopenharmony_ciint ima_eventdigest_ng_init(struct ima_event_data *event_data, 4262306a36Sopenharmony_ci struct ima_field_data *field_data); 4362306a36Sopenharmony_ciint ima_eventdigest_ngv2_init(struct ima_event_data *event_data, 4462306a36Sopenharmony_ci struct ima_field_data *field_data); 4562306a36Sopenharmony_ciint ima_eventdigest_modsig_init(struct ima_event_data *event_data, 4662306a36Sopenharmony_ci struct ima_field_data *field_data); 4762306a36Sopenharmony_ciint ima_eventname_ng_init(struct ima_event_data *event_data, 4862306a36Sopenharmony_ci struct ima_field_data *field_data); 4962306a36Sopenharmony_ciint ima_eventsig_init(struct ima_event_data *event_data, 5062306a36Sopenharmony_ci struct ima_field_data *field_data); 5162306a36Sopenharmony_ciint ima_eventbuf_init(struct ima_event_data *event_data, 5262306a36Sopenharmony_ci struct ima_field_data *field_data); 5362306a36Sopenharmony_ciint ima_eventmodsig_init(struct ima_event_data *event_data, 5462306a36Sopenharmony_ci struct ima_field_data *field_data); 5562306a36Sopenharmony_ciint ima_eventevmsig_init(struct ima_event_data *event_data, 5662306a36Sopenharmony_ci struct ima_field_data *field_data); 5762306a36Sopenharmony_ciint ima_eventinodeuid_init(struct ima_event_data *event_data, 5862306a36Sopenharmony_ci struct ima_field_data *field_data); 5962306a36Sopenharmony_ciint ima_eventinodegid_init(struct ima_event_data *event_data, 6062306a36Sopenharmony_ci struct ima_field_data *field_data); 6162306a36Sopenharmony_ciint ima_eventinodemode_init(struct ima_event_data *event_data, 6262306a36Sopenharmony_ci struct ima_field_data *field_data); 6362306a36Sopenharmony_ciint ima_eventinodexattrnames_init(struct ima_event_data *event_data, 6462306a36Sopenharmony_ci struct ima_field_data *field_data); 6562306a36Sopenharmony_ciint ima_eventinodexattrlengths_init(struct ima_event_data *event_data, 6662306a36Sopenharmony_ci struct ima_field_data *field_data); 6762306a36Sopenharmony_ciint ima_eventinodexattrvalues_init(struct ima_event_data *event_data, 6862306a36Sopenharmony_ci struct ima_field_data *field_data); 6962306a36Sopenharmony_ci#endif /* __LINUX_IMA_TEMPLATE_LIB_H */ 70