Commit | Line | Data |
---|---|---|
b886d83c | 1 | /* SPDX-License-Identifier: GPL-2.0-only */ |
3ce1217d RS |
2 | /* |
3 | * Copyright (C) 2013 Politecnico di Torino, Italy | |
4 | * TORSEC group -- http://security.polito.it | |
5 | * | |
6 | * Author: Roberto Sassu <roberto.sassu@polito.it> | |
7 | * | |
3ce1217d RS |
8 | * File: ima_template_lib.h |
9 | * Header for the library of supported template fields. | |
10 | */ | |
11 | #ifndef __LINUX_IMA_TEMPLATE_LIB_H | |
12 | #define __LINUX_IMA_TEMPLATE_LIB_H | |
13 | ||
14 | #include <linux/seq_file.h> | |
15 | #include "ima.h" | |
16 | ||
b17fd9ec RS |
17 | #define ENFORCE_FIELDS 0x00000001 |
18 | #define ENFORCE_BUFEND 0x00000002 | |
19 | ||
3ce1217d RS |
20 | void ima_show_template_digest(struct seq_file *m, enum ima_show_type show, |
21 | struct ima_field_data *field_data); | |
4d7aeee7 RS |
22 | void ima_show_template_digest_ng(struct seq_file *m, enum ima_show_type show, |
23 | struct ima_field_data *field_data); | |
3ce1217d RS |
24 | void ima_show_template_string(struct seq_file *m, enum ima_show_type show, |
25 | struct ima_field_data *field_data); | |
bcbc9b0c MZ |
26 | void ima_show_template_sig(struct seq_file *m, enum ima_show_type show, |
27 | struct ima_field_data *field_data); | |
86b4da8c PS |
28 | void ima_show_template_buf(struct seq_file *m, enum ima_show_type show, |
29 | struct ima_field_data *field_data); | |
b17fd9ec RS |
30 | int ima_parse_buf(void *bufstartp, void *bufendp, void **bufcurp, |
31 | int maxfields, struct ima_field_data *fields, int *curfields, | |
32 | unsigned long *len_mask, int enforce_mask, char *bufname); | |
23b57419 | 33 | int ima_eventdigest_init(struct ima_event_data *event_data, |
3ce1217d | 34 | struct ima_field_data *field_data); |
23b57419 | 35 | int ima_eventname_init(struct ima_event_data *event_data, |
3ce1217d | 36 | struct ima_field_data *field_data); |
23b57419 RS |
37 | int ima_eventdigest_ng_init(struct ima_event_data *event_data, |
38 | struct ima_field_data *field_data); | |
3878d505 TJB |
39 | int ima_eventdigest_modsig_init(struct ima_event_data *event_data, |
40 | struct ima_field_data *field_data); | |
23b57419 | 41 | int ima_eventname_ng_init(struct ima_event_data *event_data, |
4d7aeee7 | 42 | struct ima_field_data *field_data); |
23b57419 | 43 | int ima_eventsig_init(struct ima_event_data *event_data, |
bcbc9b0c | 44 | struct ima_field_data *field_data); |
86b4da8c PS |
45 | int ima_eventbuf_init(struct ima_event_data *event_data, |
46 | struct ima_field_data *field_data); | |
3878d505 TJB |
47 | int ima_eventmodsig_init(struct ima_event_data *event_data, |
48 | struct ima_field_data *field_data); | |
3ce1217d | 49 | #endif /* __LINUX_IMA_TEMPLATE_LIB_H */ |