selinuxuntil, userdomain: Restore relabelfrom access for unlabeled files.

Signed-off-by: Chris PeBenito <chpebeni@linux.microsoft.com>
This commit is contained in:
Chris PeBenito 2020-07-28 10:10:59 -04:00
parent 662d55ed5e
commit fe737c405d
3 changed files with 55 additions and 0 deletions

View File

@ -3210,6 +3210,43 @@ interface(`kernel_delete_unlabeled_sockets',`
delete_sock_files_pattern($1, unlabeled_t, unlabeled_t)
')
########################################
## <summary>
## Allow caller to relabel from unlabeled block devices.
## </summary>
## <param name="domain">
## <summary>
## Domain allowed access.
## </summary>
## </param>
#
interface(`kernel_relabelfrom_unlabeled_blk_devs',`
gen_require(`
type unlabeled_t;
')
allow $1 unlabeled_t:blk_file { getattr relabelfrom };
')
########################################
## <summary>
## Allow caller to relabel from unlabeled character devices.
## </summary>
## <param name="domain">
## <summary>
## Domain allowed access.
## </summary>
## </param>
#
interface(`kernel_relabelfrom_unlabeled_chr_devs',`
gen_require(`
type unlabeled_t;
')
allow $1 unlabeled_t:chr_file { getattr relabelfrom };
')
########################################
## <summary>
## Send and receive messages from an

View File

@ -354,6 +354,14 @@ kernel_getattr_debugfs(restorecond_t)
kernel_read_system_state(restorecond_t)
kernel_rw_pipes(restorecond_t)
kernel_use_fds(restorecond_t)
kernel_list_unlabeled(restorecond_t)
kernel_relabelfrom_unlabeled_dirs(restorecond_t)
kernel_relabelfrom_unlabeled_files(restorecond_t)
kernel_relabelfrom_unlabeled_symlinks(restorecond_t)
kernel_relabelfrom_unlabeled_pipes(restorecond_t)
kernel_relabelfrom_unlabeled_sockets(restorecond_t)
kernel_relabelfrom_unlabeled_blk_devs(restorecond_t)
kernel_relabelfrom_unlabeled_chr_devs(restorecond_t)
fs_dontaudit_list_nfs(restorecond_t)
fs_getattr_all_xattr_fs(restorecond_t)
@ -586,6 +594,8 @@ kernel_relabelfrom_unlabeled_files(setfiles_t)
kernel_relabelfrom_unlabeled_symlinks(setfiles_t)
kernel_relabelfrom_unlabeled_pipes(setfiles_t)
kernel_relabelfrom_unlabeled_sockets(setfiles_t)
kernel_relabelfrom_unlabeled_blk_devs(setfiles_t)
kernel_relabelfrom_unlabeled_chr_devs(setfiles_t)
kernel_use_fds(setfiles_t)
kernel_rw_pipes(setfiles_t)
kernel_rw_unix_dgram_sockets(setfiles_t)

View File

@ -1425,6 +1425,14 @@ template(`userdom_security_admin_template',`
# Necessary for managing /boot/efi
fs_manage_dos_files($1)
kernel_relabelfrom_unlabeled_dirs($1)
kernel_relabelfrom_unlabeled_files($1)
kernel_relabelfrom_unlabeled_symlinks($1)
kernel_relabelfrom_unlabeled_pipes($1)
kernel_relabelfrom_unlabeled_sockets($1)
kernel_relabelfrom_unlabeled_blk_devs($1)
kernel_relabelfrom_unlabeled_chr_devs($1)
mls_process_read_all_levels($1)
mls_file_read_all_levels($1)
mls_file_upgrade($1)