From 81d26ac72ec662c883b0c7318352509afd7d5070 Mon Sep 17 00:00:00 2001 From: Kenton Groombridge Date: Thu, 2 Dec 2021 13:32:04 -0500 Subject: [PATCH] kernel: add filetrans interface for unlabeled dirs Signed-off-by: Kenton Groombridge --- policy/modules/kernel/kernel.if | 34 +++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/policy/modules/kernel/kernel.if b/policy/modules/kernel/kernel.if index 30aca9ae6..4cd35959a 100644 --- a/policy/modules/kernel/kernel.if +++ b/policy/modules/kernel/kernel.if @@ -2911,6 +2911,40 @@ interface(`kernel_dontaudit_read_unlabeled_files',` dontaudit $1 unlabeled_t:file { getattr read }; ') +######################################## +## +## Create an object in unlabeled directories +## with a private type. +## +## +## +## Domain allowed access. +## +## +## +## +## The type of the object to be created. +## +## +## +## +## The object class of the object being created. +## +## +## +## +## The name of the object being created. +## +## +# +interface(`kernel_unlabeled_filetrans',` + gen_require(` + type unlabeled_t; + ') + + filetrans_pattern($1, unlabeled_t, $2, $3, $4) +') + ######################################## ## ## Delete unlabeled symbolic links.