summaryrefslogtreecommitdiff
path: root/src/file/datafile/execfile.cil
diff options
context:
space:
mode:
Diffstat (limited to 'src/file/datafile/execfile.cil')
-rw-r--r--src/file/datafile/execfile.cil59
1 files changed, 59 insertions, 0 deletions
diff --git a/src/file/datafile/execfile.cil b/src/file/datafile/execfile.cil
new file mode 100644
index 0000000..e7926a2
--- /dev/null
+++ b/src/file/datafile/execfile.cil
@@ -0,0 +1,59 @@
+;; SPDX-FileCopyrightText: © 2023 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 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_type_transition ((type ARG1)(type ARG2))
+ (typetransition ARG1 file process ARG2))
+
+ (blockinherit .file.exec.base_template)
+ (blockinherit .file.macro_template_files))))