From 5082648629e435139ca21ed3e4df4f350b8e185b Mon Sep 17 00:00:00 2001 From: Krzysztof Nowicki Date: Fri, 5 Feb 2021 23:19:44 +0100 Subject: [PATCH] Fix interface naming convention (plural predicates) Signed-off-by: Krzysztof Nowicki --- policy/modules/kernel/filesystem.if | 34 ++++++++++++++++++++++++++-- policy/modules/system/selinuxutil.te | 4 ++-- policy/modules/system/udev.te | 4 ++-- 3 files changed, 36 insertions(+), 6 deletions(-) diff --git a/policy/modules/kernel/filesystem.if b/policy/modules/kernel/filesystem.if index b85ae2f6e..648abb480 100644 --- a/policy/modules/kernel/filesystem.if +++ b/policy/modules/kernel/filesystem.if @@ -4999,7 +4999,7 @@ interface(`fs_dontaudit_use_tmpfs_chr_dev',` ## ## # -interface(`fs_relabel_tmpfs_chr_file',` +interface(`fs_relabel_tmpfs_chr_files',` gen_require(` type tmpfs_t; ') @@ -5008,6 +5008,21 @@ interface(`fs_relabel_tmpfs_chr_file',` relabel_chr_files_pattern($1, tmpfs_t, tmpfs_t) ') +######################################## +## +## Relabel character nodes on tmpfs filesystems. +## +## +## +## Domain allowed access. +## +## +# +interface(`fs_relabel_tmpfs_chr_file',` + refpolicywarn(`$0($*) has been deprecated, please use fs_relabel_tmpfs_chr_files() instead.') + fs_relabel_tmpfs_chr_files($1) +') + ######################################## ## ## Read and write block nodes on tmpfs filesystems. @@ -5037,7 +5052,7 @@ interface(`fs_rw_tmpfs_blk_files',` ## ## # -interface(`fs_relabel_tmpfs_blk_file',` +interface(`fs_relabel_tmpfs_blk_files',` gen_require(` type tmpfs_t; ') @@ -5046,6 +5061,21 @@ interface(`fs_relabel_tmpfs_blk_file',` relabel_blk_files_pattern($1, tmpfs_t, tmpfs_t) ') +######################################## +## +## Relabel block nodes on tmpfs filesystems. +## +## +## +## Domain allowed access. +## +## +# +interface(`fs_relabel_tmpfs_blk_file',` + refpolicywarn(`$0($*) has been deprecated, please use fs_relabel_tmpfs_blk_files() instead.') + fs_relabel_tmpfs_blk_files($1) +') + ######################################## ## ## Read and write, create and delete generic diff --git a/policy/modules/system/selinuxutil.te b/policy/modules/system/selinuxutil.te index 9e5572e49..51f1bac4a 100644 --- a/policy/modules/system/selinuxutil.te +++ b/policy/modules/system/selinuxutil.te @@ -671,8 +671,8 @@ ifdef(`distro_debian',` ifdef(`distro_redhat', ` fs_rw_tmpfs_chr_files(setfiles_t) fs_rw_tmpfs_blk_files(setfiles_t) - fs_relabel_tmpfs_blk_file(setfiles_t) - fs_relabel_tmpfs_chr_file(setfiles_t) + fs_relabel_tmpfs_blk_files(setfiles_t) + fs_relabel_tmpfs_chr_files(setfiles_t) ') ifdef(`distro_ubuntu',` diff --git a/policy/modules/system/udev.te b/policy/modules/system/udev.te index 521d7e9c7..71a25f8c9 100644 --- a/policy/modules/system/udev.te +++ b/policy/modules/system/udev.te @@ -229,8 +229,8 @@ ifdef(`distro_redhat',` fs_manage_tmpfs_sockets(udev_t) fs_manage_tmpfs_blk_files(udev_t) fs_manage_tmpfs_chr_files(udev_t) - fs_relabel_tmpfs_blk_file(udev_t) - fs_relabel_tmpfs_chr_file(udev_t) + fs_relabel_tmpfs_blk_files(udev_t) + fs_relabel_tmpfs_chr_files(udev_t) term_search_ptys(udev_t)