diff options
author | Dominick Grift <dominick.grift@defensec.nl> | 2023-08-20 15:44:41 +0200 |
---|---|---|
committer | Dominick Grift <dominick.grift@defensec.nl> | 2023-08-20 15:46:23 +0200 |
commit | 0c187b6ff97f91c41dab65a6426dc61f77305cdf (patch) | |
tree | 1e35f5851154500a8a39428a45a5671f9488e1da /src/sys/sysfile | |
download | selinux-policy-0c187b6ff97f91c41dab65a6426dc61f77305cdf.tar.gz |
Import dssp5
Signed-off-by: Dominick Grift <dominick.grift@defensec.nl>
Diffstat (limited to 'src/sys/sysfile')
22 files changed, 543 insertions, 0 deletions
diff --git a/src/sys/sysfile/blocksysfile.cil b/src/sys/sysfile/blocksysfile.cil new file mode 100644 index 0000000..b7c154e --- /dev/null +++ b/src/sys/sysfile/blocksysfile.cil @@ -0,0 +1,40 @@ +;; SPDX-FileCopyrightText: © 2023 Dominick Grift <dominick.grift@defensec.nl> +;; SPDX-License-Identifier: Unlicense + +(block block + + (genfscon "sysfs" "/block" sysfile_context) + + (blockinherit .sysfile.block.template) + (blockinherit .sysfile.macro_template_dirs) + (blockinherit .sysfile.macro_template_lnk_files)) + +(in sysfile + + (block block + + (macro type ((type ARG1)) + (typeattributeset typeattr ARG1)) + + (typeattribute typeattr) + + (blockinherit .file.all_macro_template_dirs) + (blockinherit .file.all_macro_template_files) + (blockinherit .file.all_macro_template_lnk_files) + + (call .sysfile.type (typeattr)) + + (block base_template + + (blockabstract base_template) + + (blockinherit .sysfile.base_template) + + (call .sysfile.block.type (sysfile))) + + (block template + + (blockabstract template) + + (blockinherit .sysfile.block.base_template) + (blockinherit .sysfile.macro_template_files)))) diff --git a/src/sys/sysfile/bussysfile.cil b/src/sys/sysfile/bussysfile.cil new file mode 100644 index 0000000..241d233 --- /dev/null +++ b/src/sys/sysfile/bussysfile.cil @@ -0,0 +1,40 @@ +;; SPDX-FileCopyrightText: © 2023 Dominick Grift <dominick.grift@defensec.nl> +;; SPDX-License-Identifier: Unlicense + +(block bus + + (genfscon "sysfs" "/bus" sysfile_context) + + (blockinherit .sysfile.bus.template) + (blockinherit .sysfile.macro_template_dirs) + (blockinherit .sysfile.macro_template_lnk_files)) + +(in sysfile + + (block bus + + (macro type ((type ARG1)) + (typeattributeset typeattr ARG1)) + + (typeattribute typeattr) + + (blockinherit .file.all_macro_template_dirs) + (blockinherit .file.all_macro_template_files) + (blockinherit .file.all_macro_template_lnk_files) + + (call .sysfile.type (typeattr)) + + (block base_template + + (blockabstract base_template) + + (blockinherit .sysfile.base_template) + + (call .sysfile.bus.type (sysfile))) + + (block template + + (blockabstract template) + + (blockinherit .sysfile.bus.base_template) + (blockinherit .sysfile.macro_template_files)))) diff --git a/src/sys/sysfile/classsysfile.cil b/src/sys/sysfile/classsysfile.cil new file mode 100644 index 0000000..888006b --- /dev/null +++ b/src/sys/sysfile/classsysfile.cil @@ -0,0 +1,40 @@ +;; SPDX-FileCopyrightText: © 2023 Dominick Grift <dominick.grift@defensec.nl> +;; SPDX-License-Identifier: Unlicense + +(block class + + (genfscon "sysfs" "/class" sysfile_context) + + (blockinherit .sysfile.class.template) + (blockinherit .sysfile.macro_template_dirs) + (blockinherit .sysfile.macro_template_lnk_files)) + +(in sysfile + + (block class + + (macro type ((type ARG1)) + (typeattributeset typeattr ARG1)) + + (typeattribute typeattr) + + (blockinherit .file.all_macro_template_dirs) + (blockinherit .file.all_macro_template_files) + (blockinherit .file.all_macro_template_lnk_files) + + (call .sysfile.type (typeattr)) + + (block base_template + + (blockabstract base_template) + + (blockinherit .sysfile.base_template) + + (call .sysfile.class.type (sysfile))) + + (block template + + (blockabstract template) + + (blockinherit .sysfile.class.base_template) + (blockinherit .sysfile.macro_template_files)))) diff --git a/src/sys/sysfile/classsysfile/zramcontrolclasssysfile.cil b/src/sys/sysfile/classsysfile/zramcontrolclasssysfile.cil new file mode 100644 index 0000000..ad852db --- /dev/null +++ b/src/sys/sysfile/classsysfile/zramcontrolclasssysfile.cil @@ -0,0 +1,9 @@ +;; SPDX-FileCopyrightText: © 2023 Dominick Grift <dominick.grift@defensec.nl> +;; SPDX-License-Identifier: Unlicense + +(block zramcontrol + + (genfscon "sysfs" "/class/zram-control" sysfile_context) + + (blockinherit .sysfile.class.template) + (blockinherit .sysfile.macro_template_dirs)) diff --git a/src/sys/sysfile/devicessysfile.cil b/src/sys/sysfile/devicessysfile.cil new file mode 100644 index 0000000..45f1f3a --- /dev/null +++ b/src/sys/sysfile/devicessysfile.cil @@ -0,0 +1,40 @@ +;; SPDX-FileCopyrightText: © 2023 Dominick Grift <dominick.grift@defensec.nl> +;; SPDX-License-Identifier: Unlicense + +(block devices + + (genfscon "sysfs" "/devices" sysfile_context) + + (blockinherit .sysfile.devices.template) + (blockinherit .sysfile.macro_template_dirs) + (blockinherit .sysfile.macro_template_lnk_files)) + +(in sysfile + + (block devices + + (macro type ((type ARG1)) + (typeattributeset typeattr ARG1)) + + (typeattribute typeattr) + + (blockinherit .file.all_macro_template_dirs) + (blockinherit .file.all_macro_template_files) + (blockinherit .file.all_macro_template_lnk_files) + + (call .sysfile.type (typeattr)) + + (block base_template + + (blockabstract base_template) + + (blockinherit .sysfile.base_template) + + (call .sysfile.devices.type (sysfile))) + + (block template + + (blockabstract template) + + (blockinherit .sysfile.devices.base_template) + (blockinherit .sysfile.macro_template_files)))) diff --git a/src/sys/sysfile/devicessysfile/cpudevicessysfile.cil b/src/sys/sysfile/devicessysfile/cpudevicessysfile.cil new file mode 100644 index 0000000..107d0a4 --- /dev/null +++ b/src/sys/sysfile/devicessysfile/cpudevicessysfile.cil @@ -0,0 +1,10 @@ +;; SPDX-FileCopyrightText: © 2023 Dominick Grift <dominick.grift@defensec.nl> +;; SPDX-License-Identifier: Unlicense + +(in cpu + + (genfscon "sysfs" "/devices/system/cpu" sysfile_context) + + (blockinherit .sysfile.devices.template) + (blockinherit .sysfile.macro_template_dirs) + (blockinherit .sysfile.macro_template_lnk_files)) diff --git a/src/sys/sysfile/devicessysfile/memorydevicessysfile.cil b/src/sys/sysfile/devicessysfile/memorydevicessysfile.cil new file mode 100644 index 0000000..b25eb11 --- /dev/null +++ b/src/sys/sysfile/devicessysfile/memorydevicessysfile.cil @@ -0,0 +1,10 @@ +;; SPDX-FileCopyrightText: © 2023 Dominick Grift <dominick.grift@defensec.nl> +;; SPDX-License-Identifier: Unlicense + +(block memory + + (genfscon "sysfs" "/devices/system/memory" sysfile_context) + + (blockinherit .sysfile.devices.template) + (blockinherit .sysfile.macro_template_dirs) + (blockinherit .sysfile.macro_template_lnk_files)) diff --git a/src/sys/sysfile/devicessysfile/nodedevicessysfile.cil b/src/sys/sysfile/devicessysfile/nodedevicessysfile.cil new file mode 100644 index 0000000..9ff1dd4 --- /dev/null +++ b/src/sys/sysfile/devicessysfile/nodedevicessysfile.cil @@ -0,0 +1,10 @@ +;; SPDX-FileCopyrightText: © 2023 Dominick Grift <dominick.grift@defensec.nl> +;; SPDX-License-Identifier: Unlicense + +(block node + + (genfscon "sysfs" "/devices/system/node" sysfile_context) + + (blockinherit .sysfile.devices.template) + (blockinherit .sysfile.macro_template_dirs) + (blockinherit .sysfile.macro_template_lnk_files)) diff --git a/src/sys/sysfile/devicessysfile/zramdevicessysfile.cil b/src/sys/sysfile/devicessysfile/zramdevicessysfile.cil new file mode 100644 index 0000000..a99223f --- /dev/null +++ b/src/sys/sysfile/devicessysfile/zramdevicessysfile.cil @@ -0,0 +1,10 @@ +;; SPDX-FileCopyrightText: © 2023 Dominick Grift <dominick.grift@defensec.nl> +;; SPDX-License-Identifier: Unlicense + +(in zram + + (genfscon "sysfs" "/devices/virtual/block/zram" sysfile_context) + + (blockinherit .sysfile.devices.template) + (blockinherit .sysfile.macro_template_dirs) + (blockinherit .sysfile.macro_template_lnk_files)) diff --git a/src/sys/sysfile/devsysfile.cil b/src/sys/sysfile/devsysfile.cil new file mode 100644 index 0000000..7c3e609 --- /dev/null +++ b/src/sys/sysfile/devsysfile.cil @@ -0,0 +1,40 @@ +;; SPDX-FileCopyrightText: © 2023 Dominick Grift <dominick.grift@defensec.nl> +;; SPDX-License-Identifier: Unlicense + +(in dev + + (genfscon "sysfs" "/dev" sysfile_context) + + (blockinherit .sysfile.dev.template) + (blockinherit .sysfile.macro_template_dirs) + (blockinherit .sysfile.macro_template_lnk_files)) + +(in sysfile + + (block dev + + (macro type ((type ARG1)) + (typeattributeset typeattr ARG1)) + + (typeattribute typeattr) + + (blockinherit .file.all_macro_template_dirs) + (blockinherit .file.all_macro_template_files) + (blockinherit .file.all_macro_template_lnk_files) + + (call .sysfile.type (typeattr)) + + (block base_template + + (blockabstract base_template) + + (blockinherit .sysfile.base_template) + + (call .sysfile.dev.type (sysfile))) + + (block template + + (blockabstract template) + + (blockinherit .sysfile.dev.base_template) + (blockinherit .sysfile.macro_template_files)))) diff --git a/src/sys/sysfile/firmwaresysfile.cil b/src/sys/sysfile/firmwaresysfile.cil new file mode 100644 index 0000000..e5241b4 --- /dev/null +++ b/src/sys/sysfile/firmwaresysfile.cil @@ -0,0 +1,40 @@ +;; SPDX-FileCopyrightText: © 2023 Dominick Grift <dominick.grift@defensec.nl> +;; SPDX-License-Identifier: Unlicense + +(block firmware + + (genfscon "sysfs" "/firmware" sysfile_context) + + (blockinherit .sysfile.firmware.template) + (blockinherit .sysfile.macro_template_dirs) + (blockinherit .sysfile.macro_template_lnk_files)) + +(in sysfile + + (block firmware + + (macro type ((type ARG1)) + (typeattributeset typeattr ARG1)) + + (typeattribute typeattr) + + (blockinherit .file.all_macro_template_dirs) + (blockinherit .file.all_macro_template_files) + (blockinherit .file.all_macro_template_lnk_files) + + (call .sysfile.type (typeattr)) + + (block base_template + + (blockabstract base_template) + + (blockinherit .sysfile.base_template) + + (call .sysfile.firmware.type (sysfile))) + + (block template + + (blockabstract template) + + (blockinherit .sysfile.firmware.base_template) + (blockinherit .sysfile.macro_template_files)))) diff --git a/src/sys/sysfile/fssysfile.cil b/src/sys/sysfile/fssysfile.cil new file mode 100644 index 0000000..ee4f259 --- /dev/null +++ b/src/sys/sysfile/fssysfile.cil @@ -0,0 +1,40 @@ +;; SPDX-FileCopyrightText: © 2023 Dominick Grift <dominick.grift@defensec.nl> +;; SPDX-License-Identifier: Unlicense + +(in fs + + (genfscon "sysfs" "/fs" sysfile_context) + + (blockinherit .sysfile.fs.template) + (blockinherit .sysfile.macro_template_dirs) + (blockinherit .sysfile.macro_template_lnk_files)) + +(in sysfile + + (block fs + + (macro type ((type ARG1)) + (typeattributeset typeattr ARG1)) + + (typeattribute typeattr) + + (blockinherit .file.all_macro_template_dirs) + (blockinherit .file.all_macro_template_files) + (blockinherit .file.all_macro_template_lnk_files) + + (call .sysfile.type (typeattr)) + + (block base_template + + (blockabstract base_template) + + (blockinherit .sysfile.base_template) + + (call .sysfile.fs.type (sysfile))) + + (block template + + (blockabstract template) + + (blockinherit .sysfile.fs.base_template) + (blockinherit .sysfile.macro_template_files)))) diff --git a/src/sys/sysfile/fssysfile/btrfssysfile.cil b/src/sys/sysfile/fssysfile/btrfssysfile.cil new file mode 100644 index 0000000..536e355 --- /dev/null +++ b/src/sys/sysfile/fssysfile/btrfssysfile.cil @@ -0,0 +1,9 @@ +;; SPDX-FileCopyrightText: © 2023 Dominick Grift <dominick.grift@defensec.nl> +;; SPDX-License-Identifier: Unlicense + +(block btrfs + + (genfscon "sysfs" "/fs/btrfs" sysfile_context) + + (blockinherit .sysfile.fs.template) + (blockinherit .sysfile.macro_template_dirs)) diff --git a/src/sys/sysfile/fssysfile/ext4fssysfile.cil b/src/sys/sysfile/fssysfile/ext4fssysfile.cil new file mode 100644 index 0000000..c79e258 --- /dev/null +++ b/src/sys/sysfile/fssysfile/ext4fssysfile.cil @@ -0,0 +1,9 @@ +;; SPDX-FileCopyrightText: © 2023 Dominick Grift <dominick.grift@defensec.nl> +;; SPDX-License-Identifier: Unlicense + +(block ext4 + + (genfscon "sysfs" "/fs/ext4" sysfile_context) + + (blockinherit .sysfile.fs.template) + (blockinherit .sysfile.macro_template_dirs)) diff --git a/src/sys/sysfile/fssysfile/f2fssysfile.cil b/src/sys/sysfile/fssysfile/f2fssysfile.cil new file mode 100644 index 0000000..f95f2c9 --- /dev/null +++ b/src/sys/sysfile/fssysfile/f2fssysfile.cil @@ -0,0 +1,9 @@ +;; SPDX-FileCopyrightText: © 2023 Dominick Grift <dominick.grift@defensec.nl> +;; SPDX-License-Identifier: Unlicense + +(block f2fs + + (genfscon "sysfs" "/fs/f2fs" sysfile_context) + + (blockinherit .sysfile.fs.template) + (blockinherit .sysfile.macro_template_dirs)) diff --git a/src/sys/sysfile/fssysfile/fusefssysfile.cil b/src/sys/sysfile/fssysfile/fusefssysfile.cil new file mode 100644 index 0000000..9fc7381 --- /dev/null +++ b/src/sys/sysfile/fssysfile/fusefssysfile.cil @@ -0,0 +1,9 @@ +;; SPDX-FileCopyrightText: © 2023 Dominick Grift <dominick.grift@defensec.nl> +;; SPDX-License-Identifier: Unlicense + +(in fuse + + (genfscon "sysfs" "/fs/fuse" sysfile_context) + + (blockinherit .sysfile.fs.template) + (blockinherit .sysfile.macro_template_dirs)) diff --git a/src/sys/sysfile/fssysfile/xfssysfile.cil b/src/sys/sysfile/fssysfile/xfssysfile.cil new file mode 100644 index 0000000..ac0986f --- /dev/null +++ b/src/sys/sysfile/fssysfile/xfssysfile.cil @@ -0,0 +1,9 @@ +;; SPDX-FileCopyrightText: © 2023 Dominick Grift <dominick.grift@defensec.nl> +;; SPDX-License-Identifier: Unlicense + +(block xfs + + (genfscon "sysfs" "/fs/xfs" sysfile_context) + + (blockinherit .sysfile.fs.template) + (blockinherit .sysfile.macro_template_dirs)) diff --git a/src/sys/sysfile/hypervisorsysfile.cil b/src/sys/sysfile/hypervisorsysfile.cil new file mode 100644 index 0000000..750559f --- /dev/null +++ b/src/sys/sysfile/hypervisorsysfile.cil @@ -0,0 +1,40 @@ +;; SPDX-FileCopyrightText: © 2023 Dominick Grift <dominick.grift@defensec.nl> +;; SPDX-License-Identifier: Unlicense + +(block hypervisor + + (genfscon "sysfs" "/hypervisor" sysfile_context) + + (blockinherit .sysfile.hypervisor.template) + (blockinherit .sysfile.macro_template_dirs) + (blockinherit .sysfile.macro_template_lnk_files)) + +(in sysfile + + (block hypervisor + + (macro type ((type ARG1)) + (typeattributeset typeattr ARG1)) + + (typeattribute typeattr) + + (blockinherit .file.all_macro_template_dirs) + (blockinherit .file.all_macro_template_files) + (blockinherit .file.all_macro_template_lnk_files) + + (call .sysfile.type (typeattr)) + + (block base_template + + (blockabstract base_template) + + (blockinherit .sysfile.base_template) + + (call .sysfile.hypervisor.type (sysfile))) + + (block template + + (blockabstract template) + + (blockinherit .sysfile.hypervisor.base_template) + (blockinherit .sysfile.macro_template_files)))) diff --git a/src/sys/sysfile/kernelsysfile.cil b/src/sys/sysfile/kernelsysfile.cil new file mode 100644 index 0000000..e719923 --- /dev/null +++ b/src/sys/sysfile/kernelsysfile.cil @@ -0,0 +1,40 @@ +;; SPDX-FileCopyrightText: © 2023 Dominick Grift <dominick.grift@defensec.nl> +;; SPDX-License-Identifier: Unlicense + +(in kernel + + (genfscon "sysfs" "/kernel" sysfile_context) + + (blockinherit .sysfile.kernel.template) + (blockinherit .sysfile.macro_template_dirs) + (blockinherit .sysfile.macro_template_lnk_files)) + +(in sysfile + + (block kernel + + (macro type ((type ARG1)) + (typeattributeset typeattr ARG1)) + + (typeattribute typeattr) + + (blockinherit .file.all_macro_template_dirs) + (blockinherit .file.all_macro_template_files) + (blockinherit .file.all_macro_template_lnk_files) + + (call .sysfile.type (typeattr)) + + (block base_template + + (blockabstract base_template) + + (blockinherit .sysfile.base_template) + + (call .sysfile.kernel.type (sysfile))) + + (block template + + (blockabstract template) + + (blockinherit .sysfile.kernel.base_template) + (blockinherit .sysfile.macro_template_files)))) diff --git a/src/sys/sysfile/kernelsysfile/ksmkernelsysfile.cil b/src/sys/sysfile/kernelsysfile/ksmkernelsysfile.cil new file mode 100644 index 0000000..a37ac55 --- /dev/null +++ b/src/sys/sysfile/kernelsysfile/ksmkernelsysfile.cil @@ -0,0 +1,9 @@ +;; SPDX-FileCopyrightText: © 2023 Dominick Grift <dominick.grift@defensec.nl> +;; SPDX-License-Identifier: Unlicense + +(in ksm + + (genfscon "sysfs" "/kernel/mm/ksm" sysfile_context) + + (blockinherit .sysfile.kernel.template) + (blockinherit .sysfile.macro_template_dirs)) diff --git a/src/sys/sysfile/modulesysfile.cil b/src/sys/sysfile/modulesysfile.cil new file mode 100644 index 0000000..6a2f95d --- /dev/null +++ b/src/sys/sysfile/modulesysfile.cil @@ -0,0 +1,40 @@ +;; SPDX-FileCopyrightText: © 2023 Dominick Grift <dominick.grift@defensec.nl> +;; SPDX-License-Identifier: Unlicense + +(block module + + (genfscon "sysfs" "/module" sysfile_context) + + (blockinherit .sysfile.macro_template_dirs) + (blockinherit .sysfile.macro_template_lnk_files) + (blockinherit .sysfile.module.template)) + +(in sysfile + + (block module + + (macro type ((type ARG1)) + (typeattributeset typeattr ARG1)) + + (typeattribute typeattr) + + (blockinherit .file.all_macro_template_dirs) + (blockinherit .file.all_macro_template_files) + (blockinherit .file.all_macro_template_lnk_files) + + (call .sysfile.type (typeattr)) + + (block base_template + + (blockabstract base_template) + + (blockinherit .sysfile.base_template) + + (call .sysfile.module.type (sysfile))) + + (block template + + (blockabstract template) + + (blockinherit .sysfile.module.base_template) + (blockinherit .sysfile.macro_template_files)))) diff --git a/src/sys/sysfile/powersysfile.cil b/src/sys/sysfile/powersysfile.cil new file mode 100644 index 0000000..47bb32a --- /dev/null +++ b/src/sys/sysfile/powersysfile.cil @@ -0,0 +1,40 @@ +;; SPDX-FileCopyrightText: © 2023 Dominick Grift <dominick.grift@defensec.nl> +;; SPDX-License-Identifier: Unlicense + +(block power + + (genfscon "sysfs" "/power" sysfile_context) + + (blockinherit .sysfile.macro_template_dirs) + (blockinherit .sysfile.macro_template_lnk_files) + (blockinherit .sysfile.power.template)) + +(in sysfile + + (block power + + (macro type ((type ARG1)) + (typeattributeset typeattr ARG1)) + + (typeattribute typeattr) + + (blockinherit .file.all_macro_template_dirs) + (blockinherit .file.all_macro_template_files) + (blockinherit .file.all_macro_template_lnk_files) + + (call .sysfile.type (typeattr)) + + (block base_template + + (blockabstract base_template) + + (blockinherit .sysfile.base_template) + + (call .sysfile.power.type (sysfile))) + + (block template + + (blockabstract template) + + (blockinherit .sysfile.power.base_template) + (blockinherit .sysfile.macro_template_files)))) |