summaryrefslogtreecommitdiff
path: root/src/file/datafile/execfile.cil
blob: ef13723b006689070de7e5d10d1b1d6c492faf8a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
;; SPDX-FileCopyrightText: M-BM-) 2025 Dominick Grift <dominick.grift@defensec.nl>
;; SPDX-License-Identifier: Unlicense

(block exec

    (blockinherit .file.exec.template)
    (blockinherit .file.macro_template_dirs)
    (blockinherit .file.macro_template_lnk_files))

(in file

    (block exec

	(macro entrypoint_all_files ((type ARG1))
	    (allow ARG1 typeattr (file (entrypoint))))

	(macro getattr_all_files ((type ARG1))
	    (allow ARG1 typeattr (file (getattr))))

	(macro map_all_files ((type ARG1))
	    (allow ARG1 typeattr (file (map))))

	(macro subj_range_transition ((type ARG1)(levelrange ARG2))
	    (rangetransition ARG1 typeattr process ARG2))

	(macro subj_role_transition ((role ARG1)(role ARG2))
	    (roletransition ARG1 typeattr process ARG2))

	(macro subj_type_transition ((type ARG1)(type ARG2))
	    (typetransition ARG1 typeattr process ARG2))

	(macro type ((type ARG1))
	    (typeattributeset typeattr ARG1))

	(blockinherit file.all_macro_template_files)

	(typeattribute typeattr)

	(call data.type (typeattr))

	(call .subj.entry.type (typeattr))

	(block base_template

	    (blockabstract base_template)

	    (blockinherit .file.base_template)

	    (call .file.exec.type (file)))

	(block template

	    (blockabstract template)

	    (macro entrypoint_file_files ((type ARG1))
		(allow ARG1 file (file (entrypoint))))

	    (macro getattr_file_files ((type ARG1))
		(allow ARG1 file (file (getattr))))

	    (macro map_file_files ((type ARG1))
		(allow ARG1 file (file (map))))

	    (macro subj_range_transition ((type ARG1)(levelrange ARG2))
		(rangetransition ARG1 file process ARG2))

	    (macro subj_role_transition ((role ARG1)(role ARG2))
		(roletransition ARG1 file process ARG2))

	    (macro subj_type_transition ((type ARG1)(type ARG2))
		(typetransition ARG1 file process ARG2))

	    (blockinherit .file.exec.base_template)
	    (blockinherit .file.macro_template_files))))