diff options
Diffstat (limited to 'src/selinux/booleanfile')
3 files changed, 103 insertions, 0 deletions
diff --git a/src/selinux/booleanfile/invalidassociationsbooleanfile.cil b/src/selinux/booleanfile/invalidassociationsbooleanfile.cil new file mode 100644 index 0000000..1eaf3c0 --- /dev/null +++ b/src/selinux/booleanfile/invalidassociationsbooleanfile.cil @@ -0,0 +1,35 @@ +;; SPDX-FileCopyrightText: © 2023 Dominick Grift <dominick.grift@defensec.nl> +;; SPDX-License-Identifier: Unlicense + +(tunable invalid_associations true) + +(block invalid_associations + + (genfscon "selinuxfs" "/booleans/invalid_associations" booleanfile_context) + + (blockinherit .booleanfile.template)) + +(block invalidassociations + + (macro type ((type ARG1)) + (typeattributeset typeattr ARG1)) + + (typeattribute typeattr) + + (block except + + (macro type ((type ARG1)) + (typeattributeset typeattr ARG1)) + + (typeattribute typeattr) + + (typeattributeset typeattr + (and invalidassociations.typeattr + (not (exception.typeattr))))) + + (block exception + + (macro type ((type ARG1)) + (typeattributeset typeattr ARG1)) + + (typeattribute typeattr))) diff --git a/src/selinux/booleanfile/invalidpacketsbooleanfile.cil b/src/selinux/booleanfile/invalidpacketsbooleanfile.cil new file mode 100644 index 0000000..9b638a0 --- /dev/null +++ b/src/selinux/booleanfile/invalidpacketsbooleanfile.cil @@ -0,0 +1,34 @@ +;; SPDX-FileCopyrightText: © 2023 Dominick Grift <dominick.grift@defensec.nl> +;; SPDX-License-Identifier: Unlicense + +(tunable invalid_packets true) + +(block invalid_packets + + (genfscon "selinuxfs" "/booleans/invalid_packets" booleanfile_context) + + (blockinherit .booleanfile.template)) + +(block invalidpackets + + (macro type ((type ARG1)) + (typeattributeset typeattr ARG1)) + + (typeattribute typeattr) + + (block except + + (macro type ((type ARG1)) + (typeattributeset typeattr ARG1)) + + (typeattribute typeattr) + + (typeattributeset typeattr + (and invalidpackets.typeattr (not (exception.typeattr))))) + + (block exception + + (macro type ((type ARG1)) + (typeattributeset typeattr ARG1)) + + (typeattribute typeattr))) diff --git a/src/selinux/booleanfile/invalidpeersbooleanfile.cil b/src/selinux/booleanfile/invalidpeersbooleanfile.cil new file mode 100644 index 0000000..3a0b6cd --- /dev/null +++ b/src/selinux/booleanfile/invalidpeersbooleanfile.cil @@ -0,0 +1,34 @@ +;; SPDX-FileCopyrightText: © 2023 Dominick Grift <dominick.grift@defensec.nl> +;; SPDX-License-Identifier: Unlicense + +(tunable invalid_peers true) + +(block invalid_peers + + (genfscon "selinuxfs" "/booleans/invalid_peers" booleanfile_context) + + (blockinherit .booleanfile.template)) + +(block invalidpeers + + (macro type ((type ARG1)) + (typeattributeset typeattr ARG1)) + + (typeattribute typeattr) + + (block except + + (macro type ((type ARG1)) + (typeattributeset typeattr ARG1)) + + (typeattribute typeattr) + + (typeattributeset typeattr + (and invalidpeers.typeattr (not (exception.typeattr))))) + + (block exception + + (macro type ((type ARG1)) + (typeattributeset typeattr ARG1)) + + (typeattribute typeattr))) |