From 88072fd293ddd3e83c0625199d6f0561dcad99d7 Mon Sep 17 00:00:00 2001 From: Zdenek Pytela Date: Fri, 8 Apr 2022 11:48:14 +0200 Subject: [PATCH] Add the corecmd_watch_bin_dirs() interface Reference: https://gitbub.com/fedora-selinux/selinux-policy/commit/88072fd293ddd3e83c0625199d6f0561dcad99d7 Conflict: NA Note the bin_t type is also used as a default type for files in /usr/libexec and some additional paths. Signed-off-by: lujie54 --- policy/modules/kernel/corecommands.if | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/policy/modules/kernel/corecommands.if b/policy/modules/kernel/corecommands.if index 70b6b35..d88c5c0 100644 --- a/policy/modules/kernel/corecommands.if +++ b/policy/modules/kernel/corecommands.if @@ -201,6 +201,24 @@ interface(`corecmd_dontaudit_write_bin_dirs',` ######################################## ## +## Watch bin directories. +## +## +## +## Domain allowed access. +## +## +# +interface(`corecmd_watch_bin_dirs',` + gen_require(` + type bin_t; + ') + + allow $1 bin_t:dir watch_dir_perms; +') + +######################################## +## ## Get the attributes of files in bin directories. ## ## -- 1.8.3.1