|
Chris PeBenito |
490639 |
## <summary>Policy for user domains</summary>
|
|
Chris PeBenito |
b16c6b |
|
|
Chris PeBenito |
8fd367 |
#######################################
|
|
Chris PeBenito |
8fd367 |
## <summary>
|
|
Chris PeBenito |
bbcd3c |
## The template containing the most basic rules common to all users.
|
|
Chris PeBenito |
8fd367 |
## </summary>
|
|
Chris PeBenito |
8fd367 |
## <desc>
|
|
Chris PeBenito |
8fd367 |
##
|
|
Chris PeBenito |
bbcd3c |
## The template containing the most basic rules common to all users.
|
|
Chris PeBenito |
8fd367 |
##
|
|
Chris PeBenito |
8fd367 |
##
|
|
Chris PeBenito |
bbcd3c |
## This template creates a user domain, types, and
|
|
Chris PeBenito |
bbcd3c |
## rules for the user's tty and pty.
|
|
Chris PeBenito |
8fd367 |
##
|
|
Chris PeBenito |
8fd367 |
## </desc>
|
|
Chris PeBenito |
8fd367 |
## <param name="userdomain_prefix">
|
|
Chris PeBenito |
885b83 |
## <summary>
|
|
Chris PeBenito |
8fd367 |
## The prefix of the user domain (e.g., user
|
|
Chris PeBenito |
8fd367 |
## is the prefix for user_t).
|
|
Chris PeBenito |
885b83 |
## </summary>
|
|
Chris PeBenito |
8fd367 |
## </param>
|
|
Chris PeBenito |
bbcd3c |
## <rolebase/>
|
|
Chris PeBenito |
b16c6b |
#
|
|
Chris PeBenito |
bbcd3c |
template(`userdom_base_user_template',`
|
|
Chris PeBenito |
c6a60b |
|
|
Chris PeBenito |
c6a60b |
gen_require(`
|
|
Chris PeBenito |
d6d16b |
attribute userdomain;
|
|
Chris PeBenito |
296273 |
type user_devpts_t, user_tty_device_t;
|
|
Chris PeBenito |
c6a60b |
class context contains;
|
|
Chris PeBenito |
c6a60b |
')
|
|
Chris PeBenito |
c6a60b |
|
|
Chris PeBenito |
0c73cd |
attribute $1_file_type;
|
|
Chris PeBenito |
0c73cd |
|
|
Chris PeBenito |
0c73cd |
type $1_t, userdomain;
|
|
Chris PeBenito |
c9428d |
domain_type($1_t)
|
|
Chris PeBenito |
c9428d |
corecmd_shell_entry_type($1_t)
|
|
Chris PeBenito |
d40c0e |
corecmd_bin_entry_type($1_t)
|
|
Chris PeBenito |
2e863f |
domain_user_exemption_target($1_t)
|
|
Chris PeBenito |
296273 |
ubac_constrained($1_t)
|
|
Chris PeBenito |
0c73cd |
role $1_r types $1_t;
|
|
Chris PeBenito |
0c73cd |
allow system_r $1_r;
|
|
Chris PeBenito |
0c73cd |
|
|
Chris PeBenito |
296273 |
term_user_pty($1_t, user_devpts_t)
|
|
Chris PeBenito |
0c73cd |
|
|
Chris PeBenito |
296273 |
term_user_tty($1_t, user_tty_device_t)
|
|
Chris PeBenito |
0c73cd |
|
|
Chris PeBenito |
847937 |
allow $1_t self:process { signal_perms getsched setsched share getpgid setpgid setcap getsession getattr };
|
|
Chris PeBenito |
0c73cd |
allow $1_t self:fd use;
|
|
Chris PeBenito |
c0868a |
allow $1_t self:fifo_file rw_fifo_file_perms;
|
|
Chris PeBenito |
037762 |
allow $1_t self:unix_dgram_socket { create_socket_perms sendto };
|
|
Chris PeBenito |
037762 |
allow $1_t self:unix_stream_socket { create_stream_socket_perms connectto };
|
|
Chris PeBenito |
cc41a9 |
allow $1_t self:shm create_shm_perms;
|
|
Chris PeBenito |
cc41a9 |
allow $1_t self:sem create_sem_perms;
|
|
Chris PeBenito |
cc41a9 |
allow $1_t self:msgq create_msgq_perms;
|
|
Chris PeBenito |
0c73cd |
allow $1_t self:msg { send receive };
|
|
Chris PeBenito |
c6a60b |
allow $1_t self:context contains;
|
|
Chris PeBenito |
0c73cd |
dontaudit $1_t self:socket create;
|
|
Chris PeBenito |
0c73cd |
|
|
Chris PeBenito |
296273 |
allow $1_t user_devpts_t:chr_file { setattr rw_chr_file_perms };
|
|
Chris PeBenito |
73c77e |
term_create_pty($1_t, user_devpts_t)
|
|
Chris PeBenito |
296273 |
# avoid annoying messages on terminal hangup on role change
|
|
Chris PeBenito |
296273 |
dontaudit $1_t user_devpts_t:chr_file ioctl;
|
|
Chris PeBenito |
0c73cd |
|
|
Chris PeBenito |
296273 |
allow $1_t user_tty_device_t:chr_file { setattr rw_chr_file_perms };
|
|
Chris PeBenito |
296273 |
# avoid annoying messages on terminal hangup on role change
|
|
Chris PeBenito |
296273 |
dontaudit $1_t user_tty_device_t:chr_file ioctl;
|
|
Chris PeBenito |
0c73cd |
|
|
Chris PeBenito |
445522 |
kernel_read_kernel_sysctls($1_t)
|
|
Chris PeBenito |
ac9aa2 |
kernel_dontaudit_list_unlabeled($1_t)
|
|
Chris PeBenito |
445522 |
kernel_dontaudit_getattr_unlabeled_files($1_t)
|
|
Chris PeBenito |
ac9aa2 |
kernel_dontaudit_getattr_unlabeled_symlinks($1_t)
|
|
Chris PeBenito |
ac9aa2 |
kernel_dontaudit_getattr_unlabeled_pipes($1_t)
|
|
Chris PeBenito |
ac9aa2 |
kernel_dontaudit_getattr_unlabeled_sockets($1_t)
|
|
Chris PeBenito |
445522 |
kernel_dontaudit_getattr_unlabeled_blk_files($1_t)
|
|
Chris PeBenito |
445522 |
kernel_dontaudit_getattr_unlabeled_chr_files($1_t)
|
|
Chris PeBenito |
0c73cd |
|
|
Chris PeBenito |
847937 |
dev_dontaudit_getattr_all_blk_files($1_t)
|
|
Chris PeBenito |
847937 |
dev_dontaudit_getattr_all_chr_files($1_t)
|
|
Chris PeBenito |
847937 |
|
|
Chris PeBenito |
2ec4c9 |
# When the user domain runs ps, there will be a number of access
|
|
Chris PeBenito |
2ec4c9 |
# denials when ps tries to search /proc. Do not audit these denials.
|
|
Chris PeBenito |
2ec4c9 |
domain_dontaudit_read_all_domains_state($1_t)
|
|
Chris PeBenito |
ac9aa2 |
domain_dontaudit_getattr_all_domains($1_t)
|
|
Chris PeBenito |
2ec4c9 |
domain_dontaudit_getsession_all_domains($1_t)
|
|
Chris PeBenito |
0c73cd |
|
|
Chris PeBenito |
bbcd3c |
files_read_etc_files($1_t)
|
|
Chris PeBenito |
bbcd3c |
files_read_etc_runtime_files($1_t)
|
|
Chris PeBenito |
bbcd3c |
files_read_usr_files($1_t)
|
|
Chris PeBenito |
bbcd3c |
# Read directories and files with the readable_t type.
|
|
Chris PeBenito |
bbcd3c |
# This type is a general type for "world"-readable files.
|
|
Chris PeBenito |
bbcd3c |
files_list_world_readable($1_t)
|
|
Chris PeBenito |
bbcd3c |
files_read_world_readable_files($1_t)
|
|
Chris PeBenito |
bbcd3c |
files_read_world_readable_symlinks($1_t)
|
|
Chris PeBenito |
bbcd3c |
files_read_world_readable_pipes($1_t)
|
|
Chris PeBenito |
bbcd3c |
files_read_world_readable_sockets($1_t)
|
|
Chris PeBenito |
a2868f |
# old broswer_domain():
|
|
Chris PeBenito |
a2868f |
files_dontaudit_list_non_security($1_t)
|
|
Chris PeBenito |
a2868f |
files_dontaudit_getattr_non_security_files($1_t)
|
|
Chris PeBenito |
a2868f |
files_dontaudit_getattr_non_security_symlinks($1_t)
|
|
Chris PeBenito |
a2868f |
files_dontaudit_getattr_non_security_pipes($1_t)
|
|
Chris PeBenito |
a2868f |
files_dontaudit_getattr_non_security_sockets($1_t)
|
|
Chris PeBenito |
0c73cd |
|
|
Chris PeBenito |
bbcd3c |
libs_exec_ld_so($1_t)
|
|
Chris PeBenito |
bbcd3c |
|
|
Chris PeBenito |
bbcd3c |
miscfiles_read_localization($1_t)
|
|
Chris PeBenito |
6b19be |
miscfiles_read_certs($1_t)
|
|
Chris PeBenito |
6b19be |
|
|
Chris PeBenito |
6b19be |
sysnet_read_config($1_t)
|
|
Chris PeBenito |
bbcd3c |
|
|
Chris PeBenito |
bbcd3c |
tunable_policy(`allow_execmem',`
|
|
Chris PeBenito |
bbcd3c |
# Allow loading DSOs that require executable stack.
|
|
Chris PeBenito |
bbcd3c |
allow $1_t self:process execmem;
|
|
Chris PeBenito |
bbcd3c |
')
|
|
Chris PeBenito |
bbcd3c |
|
|
Chris PeBenito |
bbcd3c |
tunable_policy(`allow_execmem && allow_execstack',`
|
|
Chris PeBenito |
bbcd3c |
# Allow making the stack executable via mprotect.
|
|
Chris PeBenito |
bbcd3c |
allow $1_t self:process execstack;
|
|
Chris PeBenito |
bbcd3c |
')
|
|
Chris PeBenito |
bbcd3c |
')
|
|
Chris PeBenito |
bbcd3c |
|
|
Chris PeBenito |
bbcd3c |
#######################################
|
|
Chris PeBenito |
bbcd3c |
## <summary>
|
|
Chris PeBenito |
296273 |
## Allow a home directory for which the
|
|
Chris PeBenito |
296273 |
## role has read-only access.
|
|
Chris PeBenito |
bbcd3c |
## </summary>
|
|
Chris PeBenito |
bbcd3c |
## <desc>
|
|
Chris PeBenito |
bbcd3c |
##
|
|
Chris PeBenito |
296273 |
## Allow a home directory for which the
|
|
Chris PeBenito |
296273 |
## role has read-only access.
|
|
Chris PeBenito |
bbcd3c |
##
|
|
Chris PeBenito |
bbcd3c |
##
|
|
Chris PeBenito |
bbcd3c |
## This does not allow execute access.
|
|
Chris PeBenito |
bbcd3c |
##
|
|
Chris PeBenito |
bbcd3c |
## </desc>
|
|
Chris PeBenito |
296273 |
## <param name="role">
|
|
Chris PeBenito |
bbcd3c |
## <summary>
|
|
Chris PeBenito |
296273 |
## The user role
|
|
Chris PeBenito |
296273 |
## </summary>
|
|
Chris PeBenito |
296273 |
## </param>
|
|
Chris PeBenito |
296273 |
## <param name="userdomain">
|
|
Chris PeBenito |
296273 |
## <summary>
|
|
Chris PeBenito |
296273 |
## The user domain
|
|
Chris PeBenito |
bbcd3c |
## </summary>
|
|
Chris PeBenito |
bbcd3c |
## </param>
|
|
Chris PeBenito |
bbcd3c |
## <rolebase/>
|
|
Chris PeBenito |
bbcd3c |
#
|
|
Chris PeBenito |
296273 |
interface(`userdom_ro_home_role',`
|
|
Chris PeBenito |
d6d16b |
gen_require(`
|
|
Chris PeBenito |
296273 |
type user_home_t, user_home_dir_t;
|
|
Chris PeBenito |
d6d16b |
')
|
|
Chris PeBenito |
d6d16b |
|
|
Chris PeBenito |
296273 |
role $1 types { user_home_t user_home_dir_t };
|
|
Chris PeBenito |
bbcd3c |
|
|
Chris PeBenito |
bbcd3c |
##############################
|
|
Chris PeBenito |
bbcd3c |
#
|
|
Chris PeBenito |
bbcd3c |
# Domain access to home dir
|
|
Chris PeBenito |
bbcd3c |
#
|
|
Chris PeBenito |
bbcd3c |
|
|
Chris PeBenito |
296273 |
type_member $2 user_home_dir_t:dir user_home_dir_t;
|
|
Chris PeBenito |
296273 |
|
|
Chris PeBenito |
bbcd3c |
# read-only home directory
|
|
Chris PeBenito |
296273 |
allow $2 user_home_dir_t:dir list_dir_perms;
|
|
Chris PeBenito |
296273 |
allow $2 user_home_t:dir list_dir_perms;
|
|
Chris PeBenito |
296273 |
allow $2 user_home_t:file entrypoint;
|
|
Chris PeBenito |
296273 |
read_files_pattern($2, { user_home_t user_home_dir_t }, user_home_t)
|
|
Chris PeBenito |
296273 |
read_lnk_files_pattern($2, { user_home_t user_home_dir_t }, user_home_t)
|
|
Chris PeBenito |
296273 |
read_fifo_files_pattern($2, { user_home_t user_home_dir_t }, user_home_t)
|
|
Chris PeBenito |
296273 |
read_sock_files_pattern($2, { user_home_t user_home_dir_t }, user_home_t)
|
|
Chris PeBenito |
296273 |
files_list_home($2)
|
|
Chris PeBenito |
bbcd3c |
|
|
Chris PeBenito |
bbcd3c |
tunable_policy(`use_nfs_home_dirs',`
|
|
Chris PeBenito |
296273 |
fs_list_nfs($2)
|
|
Chris PeBenito |
296273 |
fs_read_nfs_files($2)
|
|
Chris PeBenito |
296273 |
fs_read_nfs_symlinks($2)
|
|
Chris PeBenito |
296273 |
fs_read_nfs_named_sockets($2)
|
|
Chris PeBenito |
296273 |
fs_read_nfs_named_pipes($2)
|
|
Chris PeBenito |
bbcd3c |
',`
|
|
Chris PeBenito |
296273 |
fs_dontaudit_list_nfs($2)
|
|
Chris PeBenito |
296273 |
fs_dontaudit_read_nfs_files($2)
|
|
Chris PeBenito |
bbcd3c |
')
|
|
Chris PeBenito |
bbcd3c |
|
|
Chris PeBenito |
bbcd3c |
tunable_policy(`use_samba_home_dirs',`
|
|
Chris PeBenito |
296273 |
fs_list_cifs($2)
|
|
Chris PeBenito |
296273 |
fs_read_cifs_files($2)
|
|
Chris PeBenito |
296273 |
fs_read_cifs_symlinks($2)
|
|
Chris PeBenito |
296273 |
fs_read_cifs_named_sockets($2)
|
|
Chris PeBenito |
296273 |
fs_read_cifs_named_pipes($2)
|
|
Chris PeBenito |
bbcd3c |
',`
|
|
Chris PeBenito |
296273 |
fs_dontaudit_list_cifs($2)
|
|
Chris PeBenito |
296273 |
fs_dontaudit_read_cifs_files($2)
|
|
Chris PeBenito |
bbcd3c |
')
|
|
Chris PeBenito |
bbcd3c |
')
|
|
Chris PeBenito |
bbcd3c |
|
|
Chris PeBenito |
bbcd3c |
#######################################
|
|
Chris PeBenito |
bbcd3c |
## <summary>
|
|
Chris PeBenito |
296273 |
## Allow a home directory for which the
|
|
Chris PeBenito |
296273 |
## role has full access.
|
|
Chris PeBenito |
bbcd3c |
## </summary>
|
|
Chris PeBenito |
bbcd3c |
## <desc>
|
|
Chris PeBenito |
bbcd3c |
##
|
|
Chris PeBenito |
296273 |
## Allow a home directory for which the
|
|
Chris PeBenito |
296273 |
## role has full access.
|
|
Chris PeBenito |
bbcd3c |
##
|
|
Chris PeBenito |
bbcd3c |
##
|
|
Chris PeBenito |
bbcd3c |
## This does not allow execute access.
|
|
Chris PeBenito |
bbcd3c |
##
|
|
Chris PeBenito |
bbcd3c |
## </desc>
|
|
Chris PeBenito |
296273 |
## <param name="role">
|
|
Chris PeBenito |
bbcd3c |
## <summary>
|
|
Chris PeBenito |
296273 |
## The user role
|
|
Chris PeBenito |
296273 |
## </summary>
|
|
Chris PeBenito |
296273 |
## </param>
|
|
Chris PeBenito |
296273 |
## <param name="userdomain">
|
|
Chris PeBenito |
296273 |
## <summary>
|
|
Chris PeBenito |
296273 |
## The user domain
|
|
Chris PeBenito |
bbcd3c |
## </summary>
|
|
Chris PeBenito |
bbcd3c |
## </param>
|
|
Chris PeBenito |
bbcd3c |
## <rolebase/>
|
|
Chris PeBenito |
bbcd3c |
#
|
|
Chris PeBenito |
296273 |
interface(`userdom_manage_home_role',`
|
|
Chris PeBenito |
d6d16b |
gen_require(`
|
|
Chris PeBenito |
296273 |
type user_home_t, user_home_dir_t;
|
|
Chris PeBenito |
d6d16b |
')
|
|
Chris PeBenito |
d6d16b |
|
|
Chris PeBenito |
296273 |
role $1 types { user_home_t user_home_dir_t };
|
|
Chris PeBenito |
bbcd3c |
|
|
Chris PeBenito |
bbcd3c |
##############################
|
|
Chris PeBenito |
bbcd3c |
#
|
|
Chris PeBenito |
bbcd3c |
# Domain access to home dir
|
|
Chris PeBenito |
bbcd3c |
#
|
|
Chris PeBenito |
bbcd3c |
|
|
Chris PeBenito |
296273 |
type_member $2 user_home_dir_t:dir user_home_dir_t;
|
|
Chris PeBenito |
296273 |
|
|
Chris PeBenito |
bbcd3c |
# full control of the home directory
|
|
Chris PeBenito |
296273 |
allow $2 user_home_t:file entrypoint;
|
|
Chris PeBenito |
296273 |
manage_dirs_pattern($2, { user_home_dir_t user_home_t }, user_home_t)
|
|
Chris PeBenito |
296273 |
manage_files_pattern($2, { user_home_dir_t user_home_t }, user_home_t)
|
|
Chris PeBenito |
296273 |
manage_lnk_files_pattern($2, { user_home_dir_t user_home_t }, user_home_t)
|
|
Chris PeBenito |
296273 |
manage_sock_files_pattern($2, { user_home_dir_t user_home_t }, user_home_t)
|
|
Chris PeBenito |
296273 |
manage_fifo_files_pattern($2, { user_home_dir_t user_home_t }, user_home_t)
|
|
Chris PeBenito |
296273 |
relabel_dirs_pattern($2, { user_home_dir_t user_home_t }, user_home_t)
|
|
Chris PeBenito |
296273 |
relabel_files_pattern($2, { user_home_dir_t user_home_t }, user_home_t)
|
|
Chris PeBenito |
296273 |
relabel_lnk_files_pattern($2, { user_home_dir_t user_home_t }, user_home_t)
|
|
Chris PeBenito |
296273 |
relabel_sock_files_pattern($2, { user_home_dir_t user_home_t }, user_home_t)
|
|
Chris PeBenito |
296273 |
relabel_fifo_files_pattern($2, { user_home_dir_t user_home_t }, user_home_t)
|
|
Chris PeBenito |
296273 |
filetrans_pattern($2, user_home_dir_t, user_home_t, { dir file lnk_file sock_file fifo_file })
|
|
Chris PeBenito |
296273 |
files_list_home($2)
|
|
Chris PeBenito |
bbcd3c |
|
|
Chris PeBenito |
c0868a |
# cjp: this should probably be removed:
|
|
Chris PeBenito |
296273 |
allow $2 user_home_dir_t:dir { manage_dir_perms relabel_dir_perms };
|
|
Chris PeBenito |
c0868a |
|
|
Chris PeBenito |
bbcd3c |
tunable_policy(`use_nfs_home_dirs',`
|
|
Chris PeBenito |
296273 |
fs_manage_nfs_dirs($2)
|
|
Chris PeBenito |
296273 |
fs_manage_nfs_files($2)
|
|
Chris PeBenito |
296273 |
fs_manage_nfs_symlinks($2)
|
|
Chris PeBenito |
296273 |
fs_manage_nfs_named_sockets($2)
|
|
Chris PeBenito |
296273 |
fs_manage_nfs_named_pipes($2)
|
|
Chris PeBenito |
bbcd3c |
',`
|
|
Chris PeBenito |
296273 |
fs_dontaudit_manage_nfs_dirs($2)
|
|
Chris PeBenito |
296273 |
fs_dontaudit_manage_nfs_files($2)
|
|
Chris PeBenito |
bbcd3c |
')
|
|
Chris PeBenito |
bbcd3c |
|
|
Chris PeBenito |
bbcd3c |
tunable_policy(`use_samba_home_dirs',`
|
|
Chris PeBenito |
296273 |
fs_manage_cifs_dirs($2)
|
|
Chris PeBenito |
296273 |
fs_manage_cifs_files($2)
|
|
Chris PeBenito |
296273 |
fs_manage_cifs_symlinks($2)
|
|
Chris PeBenito |
296273 |
fs_manage_cifs_named_sockets($2)
|
|
Chris PeBenito |
296273 |
fs_manage_cifs_named_pipes($2)
|
|
Chris PeBenito |
bbcd3c |
',`
|
|
Chris PeBenito |
296273 |
fs_dontaudit_manage_cifs_dirs($2)
|
|
Chris PeBenito |
296273 |
fs_dontaudit_manage_cifs_files($2)
|
|
Chris PeBenito |
bbcd3c |
')
|
|
Chris PeBenito |
bbcd3c |
')
|
|
Chris PeBenito |
bbcd3c |
|
|
Chris PeBenito |
bbcd3c |
#######################################
|
|
Chris PeBenito |
bbcd3c |
## <summary>
|
|
Chris PeBenito |
296273 |
## Manage user temporary files
|
|
Chris PeBenito |
bbcd3c |
## </summary>
|
|
Chris PeBenito |
296273 |
## <param name="role">
|
|
Chris PeBenito |
bbcd3c |
## <summary>
|
|
Chris PeBenito |
296273 |
## Role allowed access.
|
|
Chris PeBenito |
bbcd3c |
## </summary>
|
|
Chris PeBenito |
bbcd3c |
## </param>
|
|
Chris PeBenito |
296273 |
## <param name="domain">
|
|
Chris PeBenito |
bbcd3c |
## <summary>
|
|
Chris PeBenito |
296273 |
## Domain allowed access.
|
|
Chris PeBenito |
bbcd3c |
## </summary>
|
|
Chris PeBenito |
bbcd3c |
## </param>
|
|
Chris PeBenito |
bbcd3c |
## <rolebase/>
|
|
Chris PeBenito |
bbcd3c |
#
|
|
Chris PeBenito |
296273 |
interface(`userdom_manage_tmp_role',`
|
|
Chris PeBenito |
d6d16b |
gen_require(`
|
|
Chris PeBenito |
296273 |
type user_tmp_t;
|
|
Chris PeBenito |
d6d16b |
')
|
|
Chris PeBenito |
d6d16b |
|
|
Chris PeBenito |
296273 |
role $1 types user_tmp_t;
|
|
Chris PeBenito |
bbcd3c |
|
|
Chris PeBenito |
296273 |
files_poly_member_tmp($2, user_tmp_t)
|
|
Chris PeBenito |
bbcd3c |
|
|
Chris PeBenito |
296273 |
manage_dirs_pattern($2, user_tmp_t, user_tmp_t)
|
|
Chris PeBenito |
296273 |
manage_files_pattern($2, user_tmp_t, user_tmp_t)
|
|
Chris PeBenito |
296273 |
manage_lnk_files_pattern($2, user_tmp_t, user_tmp_t)
|
|
Chris PeBenito |
296273 |
manage_sock_files_pattern($2, user_tmp_t, user_tmp_t)
|
|
Chris PeBenito |
296273 |
manage_fifo_files_pattern($2, user_tmp_t, user_tmp_t)
|
|
Chris PeBenito |
296273 |
files_tmp_filetrans($2, user_tmp_t, { dir file lnk_file sock_file fifo_file })
|
|
Chris PeBenito |
bbcd3c |
')
|
|
Chris PeBenito |
bbcd3c |
|
|
Chris PeBenito |
bbcd3c |
#######################################
|
|
Chris PeBenito |
bbcd3c |
## <summary>
|
|
Chris PeBenito |
296273 |
## The execute access user temporary files.
|
|
Chris PeBenito |
bbcd3c |
## </summary>
|
|
Chris PeBenito |
296273 |
## <param name="domain">
|
|
Chris PeBenito |
bbcd3c |
## <summary>
|
|
Chris PeBenito |
296273 |
## Domain allowed access.
|
|
Chris PeBenito |
bbcd3c |
## </summary>
|
|
Chris PeBenito |
bbcd3c |
## </param>
|
|
Chris PeBenito |
bbcd3c |
## <rolebase/>
|
|
Chris PeBenito |
bbcd3c |
#
|
|
Chris PeBenito |
296273 |
interface(`userdom_exec_user_tmp_files',`
|
|
Chris PeBenito |
296273 |
gen_require(`
|
|
Chris PeBenito |
296273 |
type user_tmp_t;
|
|
Chris PeBenito |
296273 |
')
|
|
Chris PeBenito |
296273 |
|
|
Chris PeBenito |
296273 |
exec_files_pattern($1, user_tmp_t, user_tmp_t)
|
|
Chris PeBenito |
296273 |
files_search_tmp($1)
|
|
Chris PeBenito |
bbcd3c |
')
|
|
Chris PeBenito |
bbcd3c |
|
|
Chris PeBenito |
bbcd3c |
#######################################
|
|
Chris PeBenito |
bbcd3c |
## <summary>
|
|
Chris PeBenito |
296273 |
## Role access for the user tmpfs type
|
|
Chris PeBenito |
bbcd3c |
## that the user has full access.
|
|
Chris PeBenito |
bbcd3c |
## </summary>
|
|
Chris PeBenito |
bbcd3c |
## <desc>
|
|
Chris PeBenito |
bbcd3c |
##
|
|
Chris PeBenito |
296273 |
## Role access for the user tmpfs type
|
|
Chris PeBenito |
bbcd3c |
## that the user has full access.
|
|
Chris PeBenito |
bbcd3c |
##
|
|
Chris PeBenito |
bbcd3c |
##
|
|
Chris PeBenito |
bbcd3c |
## This does not allow execute access.
|
|
Chris PeBenito |
bbcd3c |
##
|
|
Chris PeBenito |
bbcd3c |
## </desc>
|
|
Chris PeBenito |
296273 |
## <param name="role">
|
|
Chris PeBenito |
bbcd3c |
## <summary>
|
|
Chris PeBenito |
296273 |
## Role allowed access.
|
|
Chris PeBenito |
bbcd3c |
## </summary>
|
|
Chris PeBenito |
bbcd3c |
## </param>
|
|
Chris PeBenito |
296273 |
## <param name="domain">
|
|
Chris PeBenito |
bbcd3c |
## <summary>
|
|
Chris PeBenito |
296273 |
## Domain allowed access.
|
|
Chris PeBenito |
bbcd3c |
## </summary>
|
|
Chris PeBenito |
bbcd3c |
## </param>
|
|
Chris PeBenito |
296273 |
## <rolecap/>
|
|
Chris PeBenito |
bbcd3c |
#
|
|
Chris PeBenito |
296273 |
interface(`userdom_manage_tmpfs_role',`
|
|
Chris PeBenito |
bbcd3c |
gen_require(`
|
|
Chris PeBenito |
296273 |
type user_tmpfs_t;
|
|
Chris PeBenito |
bbcd3c |
')
|
|
Chris PeBenito |
bbcd3c |
|
|
Chris PeBenito |
296273 |
role $1 types user_tmpfs_t;
|
|
Chris PeBenito |
bbcd3c |
|
|
Chris PeBenito |
296273 |
manage_dirs_pattern($2, user_tmpfs_t, user_tmpfs_t)
|
|
Chris PeBenito |
296273 |
manage_files_pattern($2, user_tmpfs_t, user_tmpfs_t)
|
|
Chris PeBenito |
296273 |
manage_lnk_files_pattern($2, user_tmpfs_t, user_tmpfs_t)
|
|
Chris PeBenito |
296273 |
manage_sock_files_pattern($2, user_tmpfs_t, user_tmpfs_t)
|
|
Chris PeBenito |
296273 |
manage_fifo_files_pattern($2, user_tmpfs_t, user_tmpfs_t)
|
|
Chris PeBenito |
296273 |
fs_tmpfs_filetrans($2, user_tmpfs_t, { dir file lnk_file sock_file fifo_file })
|
|
Chris PeBenito |
bbcd3c |
')
|
|
Chris PeBenito |
bbcd3c |
|
|
Chris PeBenito |
bbcd3c |
#######################################
|
|
Chris PeBenito |
bbcd3c |
## <summary>
|
|
Chris PeBenito |
bbcd3c |
## The template allowing the user basic
|
|
Chris PeBenito |
bbcd3c |
## network permissions
|
|
Chris PeBenito |
bbcd3c |
## </summary>
|
|
Chris PeBenito |
bbcd3c |
## <param name="userdomain_prefix">
|
|
Chris PeBenito |
bbcd3c |
## <summary>
|
|
Chris PeBenito |
bbcd3c |
## The prefix of the user domain (e.g., user
|
|
Chris PeBenito |
bbcd3c |
## is the prefix for user_t).
|
|
Chris PeBenito |
bbcd3c |
## </summary>
|
|
Chris PeBenito |
bbcd3c |
## </param>
|
|
Chris PeBenito |
bbcd3c |
## <rolebase/>
|
|
Chris PeBenito |
bbcd3c |
#
|
|
Chris PeBenito |
bbcd3c |
template(`userdom_basic_networking_template',`
|
|
Chris PeBenito |
bbcd3c |
gen_require(`
|
|
Chris PeBenito |
bbcd3c |
type $1_t;
|
|
Chris PeBenito |
bbcd3c |
')
|
|
Chris PeBenito |
bbcd3c |
|
|
Chris PeBenito |
bbcd3c |
allow $1_t self:tcp_socket create_stream_socket_perms;
|
|
Chris PeBenito |
bbcd3c |
allow $1_t self:udp_socket create_socket_perms;
|
|
Chris PeBenito |
bbcd3c |
|
|
Chris PeBenito |
190066 |
corenet_all_recvfrom_unlabeled($1_t)
|
|
Chris PeBenito |
190066 |
corenet_all_recvfrom_netlabel($1_t)
|
|
Chris PeBenito |
bbcd3c |
corenet_tcp_sendrecv_all_if($1_t)
|
|
Chris PeBenito |
bbcd3c |
corenet_udp_sendrecv_all_if($1_t)
|
|
Chris PeBenito |
bbcd3c |
corenet_tcp_sendrecv_all_nodes($1_t)
|
|
Chris PeBenito |
bbcd3c |
corenet_udp_sendrecv_all_nodes($1_t)
|
|
Chris PeBenito |
bbcd3c |
corenet_tcp_sendrecv_all_ports($1_t)
|
|
Chris PeBenito |
bbcd3c |
corenet_udp_sendrecv_all_ports($1_t)
|
|
Chris PeBenito |
bbcd3c |
corenet_tcp_connect_all_ports($1_t)
|
|
Chris PeBenito |
bbcd3c |
corenet_sendrecv_all_client_packets($1_t)
|
|
Chris PeBenito |
0b6aca |
|
|
Chris PeBenito |
dc1920 |
corenet_all_recvfrom_labeled($1_t, $1_t)
|
|
Chris PeBenito |
dc1920 |
|
|
Chris PeBenito |
dc1920 |
optional_policy(`
|
|
Chris PeBenito |
dc1920 |
init_tcp_recvfrom_all_daemons($1_t)
|
|
Chris PeBenito |
dc1920 |
init_udp_recvfrom_all_daemons($1_t)
|
|
Chris PeBenito |
dc1920 |
')
|
|
Chris PeBenito |
dc1920 |
|
|
Chris PeBenito |
0b6aca |
optional_policy(`
|
|
Chris PeBenito |
0b6aca |
ipsec_match_default_spd($1_t)
|
|
Chris PeBenito |
0b6aca |
')
|
|
Chris PeBenito |
bbcd3c |
')
|
|
Chris PeBenito |
bbcd3c |
|
|
Chris PeBenito |
bbcd3c |
#######################################
|
|
Chris PeBenito |
bbcd3c |
## <summary>
|
|
Chris PeBenito |
bbcd3c |
## The template for creating a user xwindows client.
|
|
Chris PeBenito |
bbcd3c |
## </summary>
|
|
Chris PeBenito |
bbcd3c |
## <param name="userdomain_prefix">
|
|
Chris PeBenito |
bbcd3c |
## <summary>
|
|
Chris PeBenito |
bbcd3c |
## The prefix of the user domain (e.g., user
|
|
Chris PeBenito |
bbcd3c |
## is the prefix for user_t).
|
|
Chris PeBenito |
bbcd3c |
## </summary>
|
|
Chris PeBenito |
bbcd3c |
## </param>
|
|
Chris PeBenito |
bbcd3c |
## <rolebase/>
|
|
Chris PeBenito |
bbcd3c |
#
|
|
Chris PeBenito |
bbcd3c |
template(`userdom_xwindows_client_template',`
|
|
Chris PeBenito |
bbcd3c |
gen_require(`
|
|
Chris PeBenito |
296273 |
type $1_t, user_tmpfs_t;
|
|
Chris PeBenito |
bbcd3c |
')
|
|
Chris PeBenito |
bbcd3c |
|
|
Chris PeBenito |
847937 |
dev_rw_xserver_misc($1_t)
|
|
Chris PeBenito |
847937 |
dev_rw_power_management($1_t)
|
|
Chris PeBenito |
847937 |
dev_read_input($1_t)
|
|
Chris PeBenito |
847937 |
dev_read_misc($1_t)
|
|
Chris PeBenito |
847937 |
dev_write_misc($1_t)
|
|
Chris PeBenito |
847937 |
# open office is looking for the following
|
|
Chris PeBenito |
847937 |
dev_getattr_agp_dev($1_t)
|
|
Chris PeBenito |
847937 |
dev_dontaudit_rw_dri($1_t)
|
|
Chris PeBenito |
847937 |
# GNOME checks for usb and other devices:
|
|
Chris PeBenito |
847937 |
dev_rw_usbfs($1_t)
|
|
Chris PeBenito |
847937 |
|
|
Chris PeBenito |
296273 |
xserver_user_client($1_t, user_tmpfs_t)
|
|
Chris PeBenito |
847937 |
xserver_xsession_entry_type($1_t)
|
|
Chris PeBenito |
847937 |
xserver_dontaudit_write_log($1_t)
|
|
Chris PeBenito |
847937 |
xserver_stream_connect_xdm($1_t)
|
|
Chris PeBenito |
847937 |
# certain apps want to read xdm.pid file
|
|
Chris PeBenito |
847937 |
xserver_read_xdm_pid($1_t)
|
|
Chris PeBenito |
847937 |
# gnome-session creates socket under /tmp/.ICE-unix/
|
|
Chris PeBenito |
847937 |
xserver_create_xdm_tmp_sockets($1_t)
|
|
Chris PeBenito |
847937 |
# Needed for escd, remove if we get escd policy
|
|
Chris PeBenito |
847937 |
xserver_manage_xdm_tmp_files($1_t)
|
|
Chris PeBenito |
bbcd3c |
')
|
|
Chris PeBenito |
bbcd3c |
|
|
Chris PeBenito |
bbcd3c |
#######################################
|
|
Chris PeBenito |
bbcd3c |
## <summary>
|
|
Chris PeBenito |
bbcd3c |
## The template for allowing the user to change passwords.
|
|
Chris PeBenito |
bbcd3c |
## </summary>
|
|
Chris PeBenito |
bbcd3c |
## <param name="userdomain_prefix">
|
|
Chris PeBenito |
bbcd3c |
## <summary>
|
|
Chris PeBenito |
bbcd3c |
## The prefix of the user domain (e.g., user
|
|
Chris PeBenito |
bbcd3c |
## is the prefix for user_t).
|
|
Chris PeBenito |
bbcd3c |
## </summary>
|
|
Chris PeBenito |
bbcd3c |
## </param>
|
|
Chris PeBenito |
bbcd3c |
## <rolebase/>
|
|
Chris PeBenito |
bbcd3c |
#
|
|
Chris PeBenito |
bbcd3c |
template(`userdom_change_password_template',`
|
|
Chris PeBenito |
bbcd3c |
gen_require(`
|
|
Chris PeBenito |
296273 |
type $1_t;
|
|
Chris PeBenito |
bbcd3c |
role $1_r;
|
|
Chris PeBenito |
bbcd3c |
')
|
|
Chris PeBenito |
bbcd3c |
|
|
Chris PeBenito |
bbcd3c |
optional_policy(`
|
|
Chris PeBenito |
296273 |
usermanage_run_chfn($1_t,$1_r)
|
|
Chris PeBenito |
296273 |
usermanage_run_passwd($1_t,$1_r)
|
|
Chris PeBenito |
bbcd3c |
')
|
|
Chris PeBenito |
bbcd3c |
')
|
|
Chris PeBenito |
bbcd3c |
|
|
Chris PeBenito |
bbcd3c |
#######################################
|
|
Chris PeBenito |
bbcd3c |
## <summary>
|
|
Chris PeBenito |
bbcd3c |
## The template containing rules common to unprivileged
|
|
Chris PeBenito |
bbcd3c |
## users and administrative users.
|
|
Chris PeBenito |
bbcd3c |
## </summary>
|
|
Chris PeBenito |
bbcd3c |
## <desc>
|
|
Chris PeBenito |
bbcd3c |
##
|
|
Chris PeBenito |
bbcd3c |
## This template creates a user domain, types, and
|
|
Chris PeBenito |
bbcd3c |
## rules for the user's tty, pty, tmp, and tmpfs files.
|
|
Chris PeBenito |
bbcd3c |
##
|
|
Chris PeBenito |
bbcd3c |
## </desc>
|
|
Chris PeBenito |
bbcd3c |
## <param name="userdomain_prefix">
|
|
Chris PeBenito |
bbcd3c |
## <summary>
|
|
Chris PeBenito |
bbcd3c |
## The prefix of the user domain (e.g., user
|
|
Chris PeBenito |
bbcd3c |
## is the prefix for user_t).
|
|
Chris PeBenito |
bbcd3c |
## </summary>
|
|
Chris PeBenito |
bbcd3c |
## </param>
|
|
Chris PeBenito |
bbcd3c |
#
|
|
Chris PeBenito |
bbcd3c |
template(`userdom_common_user_template',`
|
|
Chris PeBenito |
563e58 |
gen_require(`
|
|
Chris PeBenito |
563e58 |
attribute unpriv_userdomain;
|
|
Chris PeBenito |
563e58 |
')
|
|
Chris PeBenito |
bbcd3c |
|
|
Chris PeBenito |
bbcd3c |
userdom_basic_networking_template($1)
|
|
Chris PeBenito |
bbcd3c |
|
|
Chris PeBenito |
847937 |
optional_policy(`
|
|
Chris PeBenito |
847937 |
userdom_xwindows_client_template($1)
|
|
Chris PeBenito |
847937 |
')
|
|
Chris PeBenito |
bbcd3c |
|
|
Chris PeBenito |
bbcd3c |
##############################
|
|
Chris PeBenito |
bbcd3c |
#
|
|
Chris PeBenito |
bbcd3c |
# User domain Local policy
|
|
Chris PeBenito |
bbcd3c |
#
|
|
Chris PeBenito |
bbcd3c |
|
|
Chris PeBenito |
bbcd3c |
# evolution and gnome-session try to create a netlink socket
|
|
Chris PeBenito |
bbcd3c |
dontaudit $1_t self:netlink_socket { create ioctl read getattr write setattr append bind connect getopt setopt shutdown };
|
|
Chris PeBenito |
bbcd3c |
dontaudit $1_t self:netlink_route_socket { create ioctl read getattr write setattr append bind connect getopt setopt shutdown nlmsg_read nlmsg_write };
|
|
Chris PeBenito |
bbcd3c |
|
|
Chris PeBenito |
bbcd3c |
allow $1_t unpriv_userdomain:fd use;
|
|
Chris PeBenito |
bbcd3c |
|
|
Chris PeBenito |
bbcd3c |
kernel_read_system_state($1_t)
|
|
Chris PeBenito |
bbcd3c |
kernel_read_network_state($1_t)
|
|
Chris PeBenito |
bbcd3c |
kernel_read_net_sysctls($1_t)
|
|
Chris PeBenito |
bbcd3c |
# Very permissive allowing every domain to see every type:
|
|
Chris PeBenito |
bbcd3c |
kernel_get_sysvipc_info($1_t)
|
|
Chris PeBenito |
bbcd3c |
# Find CDROM devices:
|
|
Chris PeBenito |
bbcd3c |
kernel_read_device_sysctls($1_t)
|
|
Chris PeBenito |
bbcd3c |
|
|
Chris PeBenito |
296273 |
corecmd_exec_bin($1_t)
|
|
Chris PeBenito |
296273 |
|
|
Chris PeBenito |
bbcd3c |
corenet_udp_bind_all_nodes($1_t)
|
|
Chris PeBenito |
bbcd3c |
corenet_udp_bind_generic_port($1_t)
|
|
Chris PeBenito |
bbcd3c |
|
|
Chris PeBenito |
bbcd3c |
dev_read_rand($1_t)
|
|
Chris PeBenito |
bbcd3c |
dev_write_sound($1_t)
|
|
Chris PeBenito |
bbcd3c |
dev_read_sound($1_t)
|
|
Chris PeBenito |
bbcd3c |
dev_read_sound_mixer($1_t)
|
|
Chris PeBenito |
bbcd3c |
dev_write_sound_mixer($1_t)
|
|
Chris PeBenito |
bbcd3c |
|
|
Chris PeBenito |
bbcd3c |
files_exec_etc_files($1_t)
|
|
Chris PeBenito |
bbcd3c |
files_search_locks($1_t)
|
|
Chris PeBenito |
bbcd3c |
# Check to see if cdrom is mounted
|
|
Chris PeBenito |
bbcd3c |
files_search_mnt($1_t)
|
|
Chris PeBenito |
bbcd3c |
# cjp: perhaps should cut back on file reads:
|
|
Chris PeBenito |
bbcd3c |
files_read_var_files($1_t)
|
|
Chris PeBenito |
bbcd3c |
files_read_var_symlinks($1_t)
|
|
Chris PeBenito |
bbcd3c |
files_read_generic_spool($1_t)
|
|
Chris PeBenito |
bbcd3c |
files_read_var_lib_files($1_t)
|
|
Chris PeBenito |
bbcd3c |
# Stat lost+found.
|
|
Chris PeBenito |
bbcd3c |
files_getattr_lost_found_dirs($1_t)
|
|
Chris PeBenito |
bbcd3c |
|
|
Chris PeBenito |
bbcd3c |
# cjp: some of this probably can be removed
|
|
Chris PeBenito |
bbcd3c |
selinux_get_fs_mount($1_t)
|
|
Chris PeBenito |
bbcd3c |
selinux_validate_context($1_t)
|
|
Chris PeBenito |
bbcd3c |
selinux_compute_access_vector($1_t)
|
|
Chris PeBenito |
bbcd3c |
selinux_compute_create_context($1_t)
|
|
Chris PeBenito |
bbcd3c |
selinux_compute_relabel_context($1_t)
|
|
Chris PeBenito |
bbcd3c |
selinux_compute_user_contexts($1_t)
|
|
Chris PeBenito |
bbcd3c |
|
|
Chris PeBenito |
bbcd3c |
# for eject
|
|
Chris PeBenito |
bbcd3c |
storage_getattr_fixed_disk_dev($1_t)
|
|
Chris PeBenito |
bbcd3c |
|
|
Chris PeBenito |
847937 |
auth_use_nsswitch($1_t)
|
|
Chris PeBenito |
bbcd3c |
auth_read_login_records($1_t)
|
|
Chris PeBenito |
bbcd3c |
auth_search_pam_console_data($1_t)
|
|
Chris PeBenito |
296273 |
auth_run_pam($1_t,$1_r)
|
|
Chris PeBenito |
296273 |
auth_run_utempter($1_t,$1_r)
|
|
Chris PeBenito |
bbcd3c |
|
|
Chris PeBenito |
bbcd3c |
init_read_utmp($1_t)
|
|
Chris PeBenito |
0c73cd |
|
|
Chris PeBenito |
a1fcff |
seutil_read_file_contexts($1_t)
|
|
Chris PeBenito |
a1fcff |
seutil_read_default_contexts($1_t)
|
|
Chris PeBenito |
296273 |
seutil_run_newrole($1_t,$1_r)
|
|
Chris PeBenito |
6b19be |
seutil_exec_checkpolicy($1_t)
|
|
Chris PeBenito |
6b19be |
seutil_exec_setfiles($1_t)
|
|
Chris PeBenito |
bbcd3c |
# for when the network connection is killed
|
|
Chris PeBenito |
bbcd3c |
# this is needed when a login role can change
|
|
Chris PeBenito |
bbcd3c |
# to this one.
|
|
Chris PeBenito |
bbcd3c |
seutil_dontaudit_signal_newrole($1_t)
|
|
Chris PeBenito |
a1fcff |
|
|
Chris PeBenito |
2ec4c9 |
tunable_policy(`read_default_t',`
|
|
Chris PeBenito |
2ec4c9 |
files_list_default($1_t)
|
|
Chris PeBenito |
2ec4c9 |
files_read_default_files($1_t)
|
|
Chris PeBenito |
2ec4c9 |
files_read_default_symlinks($1_t)
|
|
Chris PeBenito |
2ec4c9 |
files_read_default_sockets($1_t)
|
|
Chris PeBenito |
2ec4c9 |
files_read_default_pipes($1_t)
|
|
Chris PeBenito |
a1fcff |
')
|
|
Chris PeBenito |
a1fcff |
|
|
Chris PeBenito |
34c8fa |
tunable_policy(`user_direct_mouse',`
|
|
Karl MacMillan |
f0c985 |
dev_read_mouse($1_t)
|
|
Chris PeBenito |
34c8fa |
')
|
|
Chris PeBenito |
0c73cd |
|
|
Chris PeBenito |
34c8fa |
tunable_policy(`user_ttyfile_stat',`
|
|
Chris PeBenito |
0fd9dc |
term_getattr_all_user_ttys($1_t)
|
|
Chris PeBenito |
34c8fa |
')
|
|
Chris PeBenito |
0c73cd |
|
|
Chris PeBenito |
bb7170 |
optional_policy(`
|
|
Chris PeBenito |
6b19be |
alsa_read_rw_config($1_t)
|
|
Chris PeBenito |
6b19be |
')
|
|
Chris PeBenito |
6b19be |
|
|
Chris PeBenito |
6b19be |
optional_policy(`
|
|
Chris PeBenito |
ac9aa2 |
# Allow graphical boot to check battery lifespan
|
|
Chris PeBenito |
ac9aa2 |
apm_stream_connect($1_t)
|
|
Chris PeBenito |
ac9aa2 |
')
|
|
Chris PeBenito |
ac9aa2 |
|
|
Chris PeBenito |
bb7170 |
optional_policy(`
|
|
Chris PeBenito |
350948 |
canna_stream_connect($1_t)
|
|
Chris PeBenito |
350948 |
')
|
|
Chris PeBenito |
350948 |
|
|
Chris PeBenito |
bb7170 |
optional_policy(`
|
|
Chris PeBenito |
296273 |
dbus_system_bus_client($1_t)
|
|
Chris PeBenito |
d828b5 |
|
|
Chris PeBenito |
bb7170 |
optional_policy(`
|
|
Chris PeBenito |
bbcd3c |
bluetooth_dbus_chat($1_t)
|
|
Chris PeBenito |
bbcd3c |
')
|
|
Chris PeBenito |
bbcd3c |
|
|
Chris PeBenito |
bbcd3c |
optional_policy(`
|
|
Chris PeBenito |
296273 |
evolution_dbus_chat($1_t)
|
|
Chris PeBenito |
296273 |
evolution_alarm_dbus_chat($1_t)
|
|
Chris PeBenito |
6b19be |
')
|
|
Chris PeBenito |
6b19be |
|
|
Chris PeBenito |
6b19be |
optional_policy(`
|
|
Chris PeBenito |
9fd4b8 |
cups_dbus_chat_config($1_t)
|
|
Chris PeBenito |
9fd4b8 |
')
|
|
Chris PeBenito |
9fd4b8 |
|
|
Chris PeBenito |
bb7170 |
optional_policy(`
|
|
Chris PeBenito |
ac9aa2 |
hal_dbus_chat($1_t)
|
|
Chris PeBenito |
ac9aa2 |
')
|
|
Chris PeBenito |
ac9aa2 |
|
|
Chris PeBenito |
bb7170 |
optional_policy(`
|
|
Chris PeBenito |
d828b5 |
networkmanager_dbus_chat($1_t)
|
|
Chris PeBenito |
d828b5 |
')
|
|
Chris PeBenito |
0c3d17 |
')
|
|
Chris PeBenito |
0c3d17 |
|
|
Chris PeBenito |
bb7170 |
optional_policy(`
|
|
Chris PeBenito |
1c1ac6 |
inetd_use_fds($1_t)
|
|
Chris PeBenito |
1815ba |
inetd_rw_tcp_sockets($1_t)
|
|
Chris PeBenito |
b24f35 |
')
|
|
Chris PeBenito |
b24f35 |
|
|
Chris PeBenito |
bb7170 |
optional_policy(`
|
|
Chris PeBenito |
9b0640 |
inn_read_config($1_t)
|
|
Chris PeBenito |
9b0640 |
inn_read_news_lib($1_t)
|
|
Chris PeBenito |
9b0640 |
inn_read_news_spool($1_t)
|
|
Chris PeBenito |
9b0640 |
')
|
|
Chris PeBenito |
9b0640 |
|
|
Chris PeBenito |
6b19be |
optional_policy(`
|
|
Chris PeBenito |
6b19be |
locate_read_lib_files($1_t)
|
|
Chris PeBenito |
6b19be |
')
|
|
Chris PeBenito |
6b19be |
|
|
Chris PeBenito |
bbcd3c |
# for running depmod as part of the kernel packaging process
|
|
Chris PeBenito |
bbcd3c |
optional_policy(`
|
|
Chris PeBenito |
bbcd3c |
modutils_read_module_config($1_t)
|
|
Chris PeBenito |
bbcd3c |
')
|
|
Chris PeBenito |
bbcd3c |
|
|
Chris PeBenito |
bb7170 |
optional_policy(`
|
|
Chris PeBenito |
cc0c00 |
mta_rw_spool($1_t)
|
|
Chris PeBenito |
cc0c00 |
')
|
|
Chris PeBenito |
cc0c00 |
|
|
Chris PeBenito |
bb7170 |
optional_policy(`
|
|
Chris PeBenito |
bbcd3c |
tunable_policy(`allow_user_mysql_connect',`
|
|
Chris PeBenito |
bbcd3c |
mysql_stream_connect($1_t)
|
|
Chris PeBenito |
42be7c |
')
|
|
Chris PeBenito |
42be7c |
')
|
|
Chris PeBenito |
42be7c |
|
|
Chris PeBenito |
bb7170 |
optional_policy(`
|
|
Chris PeBenito |
2ec4c9 |
# to allow monitoring of pcmcia status
|
|
Chris PeBenito |
2ec4c9 |
pcmcia_read_pid($1_t)
|
|
Chris PeBenito |
2ec4c9 |
')
|
|
Chris PeBenito |
2ec4c9 |
|
|
Chris PeBenito |
bb7170 |
optional_policy(`
|
|
Chris PeBenito |
6b19be |
pcscd_read_pub_files($1_t)
|
|
Chris PeBenito |
6b19be |
pcscd_stream_connect($1_t)
|
|
Chris PeBenito |
6b19be |
')
|
|
Chris PeBenito |
6b19be |
|
|
Chris PeBenito |
6b19be |
optional_policy(`
|
|
Chris PeBenito |
cb10a2 |
tunable_policy(`allow_user_postgresql_connect',`
|
|
Chris PeBenito |
cb10a2 |
postgresql_stream_connect($1_t)
|
|
Chris PeBenito |
0b6aca |
postgresql_tcp_connect($1_t)
|
|
Chris PeBenito |
cb10a2 |
')
|
|
Chris PeBenito |
cb10a2 |
')
|
|
Chris PeBenito |
cb10a2 |
|
|
Chris PeBenito |
cb10a2 |
optional_policy(`
|
|
Chris PeBenito |
b057be |
resmgr_stream_connect($1_t)
|
|
Chris PeBenito |
b057be |
')
|
|
Chris PeBenito |
b057be |
|
|
Chris PeBenito |
b057be |
optional_policy(`
|
|
Chris PeBenito |
f00434 |
rpc_dontaudit_getattr_exports($1_t)
|
|
Chris PeBenito |
ac9aa2 |
rpc_manage_nfs_rw_content($1_t)
|
|
Chris PeBenito |
f00434 |
')
|
|
Chris PeBenito |
f00434 |
|
|
Chris PeBenito |
bb7170 |
optional_policy(`
|
|
Chris PeBenito |
1815ba |
samba_stream_connect_winbind($1_t)
|
|
Chris PeBenito |
ac9aa2 |
')
|
|
Chris PeBenito |
ac9aa2 |
|
|
Chris PeBenito |
bb7170 |
optional_policy(`
|
|
Chris PeBenito |
1d427a |
slrnpull_search_spool($1_t)
|
|
Chris PeBenito |
1d427a |
')
|
|
Chris PeBenito |
1d427a |
|
|
Chris PeBenito |
bb7170 |
optional_policy(`
|
|
Chris PeBenito |
296273 |
usernetctl_run($1_t,$1_r)
|
|
Chris PeBenito |
8cc494 |
')
|
|
Chris PeBenito |
2ec4c9 |
')
|
|
Chris PeBenito |
b16c6b |
|
|
Chris PeBenito |
8fd367 |
#######################################
|
|
Chris PeBenito |
8fd367 |
## <summary>
|
|
Chris PeBenito |
847937 |
## The template for creating a login user.
|
|
Chris PeBenito |
8fd367 |
## </summary>
|
|
Chris PeBenito |
8fd367 |
## <desc>
|
|
Chris PeBenito |
8fd367 |
##
|
|
Chris PeBenito |
8fd367 |
## This template creates a user domain, types, and
|
|
Chris PeBenito |
8fd367 |
## rules for the user's tty, pty, home directories,
|
|
Chris PeBenito |
8fd367 |
## tmp, and tmpfs files.
|
|
Chris PeBenito |
8fd367 |
##
|
|
Chris PeBenito |
8fd367 |
## </desc>
|
|
Chris PeBenito |
8fd367 |
## <param name="userdomain_prefix">
|
|
Chris PeBenito |
885b83 |
## <summary>
|
|
Chris PeBenito |
8fd367 |
## The prefix of the user domain (e.g., user
|
|
Chris PeBenito |
8fd367 |
## is the prefix for user_t).
|
|
Chris PeBenito |
885b83 |
## </summary>
|
|
Chris PeBenito |
8fd367 |
## </param>
|
|
Chris PeBenito |
b16c6b |
#
|
|
Chris PeBenito |
847937 |
template(`userdom_login_user_template', `
|
|
Chris PeBenito |
b1a903 |
gen_require(`
|
|
Chris PeBenito |
b1a903 |
class context contains;
|
|
Chris PeBenito |
b1a903 |
')
|
|
Chris PeBenito |
b1a903 |
|
|
Chris PeBenito |
847937 |
userdom_base_user_template($1)
|
|
Chris PeBenito |
563e58 |
|
|
Chris PeBenito |
296273 |
userdom_manage_home_role($1_r, $1_t)
|
|
Chris PeBenito |
847937 |
|
|
Chris PeBenito |
296273 |
userdom_manage_tmp_role($1_r, $1_t)
|
|
Chris PeBenito |
296273 |
userdom_manage_tmpfs_role($1_r, $1_t)
|
|
Chris PeBenito |
847937 |
|
|
Chris PeBenito |
296273 |
userdom_exec_user_tmp_files($1_t)
|
|
Chris PeBenito |
296273 |
userdom_exec_user_home_content_files($1_t)
|
|
Chris PeBenito |
847937 |
|
|
Chris PeBenito |
847937 |
userdom_change_password_template($1)
|
|
Chris PeBenito |
563e58 |
|
|
Chris PeBenito |
0c73cd |
##############################
|
|
Chris PeBenito |
0c73cd |
#
|
|
Chris PeBenito |
847937 |
# User domain Local policy
|
|
Chris PeBenito |
0c73cd |
#
|
|
Chris PeBenito |
b16c6b |
|
|
Chris PeBenito |
847937 |
allow $1_t self:capability { setgid chown fowner };
|
|
Chris PeBenito |
847937 |
dontaudit $1_t self:capability { sys_nice fsetid };
|
|
Chris PeBenito |
847937 |
|
|
Chris PeBenito |
847937 |
allow $1_t self:process ~{ setcurrent setexec setrlimit execmem execstack execheap };
|
|
Chris PeBenito |
847937 |
dontaudit $1_t self:process setrlimit;
|
|
Chris PeBenito |
847937 |
dontaudit $1_t self:netlink_route_socket { create ioctl read getattr write setattr append bind connect getopt setopt shutdown nlmsg_read nlmsg_write };
|
|
Chris PeBenito |
847937 |
|
|
Chris PeBenito |
847937 |
allow $1_t self:context contains;
|
|
Chris PeBenito |
847937 |
|
|
Chris PeBenito |
847937 |
kernel_dontaudit_read_system_state($1_t)
|
|
Chris PeBenito |
847937 |
|
|
Chris PeBenito |
847937 |
dev_read_sysfs($1_t)
|
|
Chris PeBenito |
847937 |
dev_read_urand($1_t)
|
|
Chris PeBenito |
847937 |
|
|
Chris PeBenito |
847937 |
domain_use_interactive_fds($1_t)
|
|
Chris PeBenito |
847937 |
# Command completion can fire hundreds of denials
|
|
Chris PeBenito |
847937 |
domain_dontaudit_exec_all_entry_files($1_t)
|
|
Chris PeBenito |
847937 |
|
|
Chris PeBenito |
847937 |
files_dontaudit_list_default($1_t)
|
|
Chris PeBenito |
847937 |
files_dontaudit_read_default_files($1_t)
|
|
Chris PeBenito |
847937 |
# Stat lost+found.
|
|
Chris PeBenito |
847937 |
files_getattr_lost_found_dirs($1_t)
|
|
Chris PeBenito |
847937 |
|
|
Chris PeBenito |
847937 |
fs_get_all_fs_quotas($1_t)
|
|
Chris PeBenito |
847937 |
fs_getattr_all_fs($1_t)
|
|
Chris PeBenito |
847937 |
fs_getattr_all_dirs($1_t)
|
|
Chris PeBenito |
847937 |
fs_search_auto_mountpoints($1_t)
|
|
Chris PeBenito |
847937 |
fs_list_inotifyfs($1_t)
|
|
Chris PeBenito |
847937 |
fs_rw_anon_inodefs_files($1_t)
|
|
Chris PeBenito |
847937 |
|
|
Chris PeBenito |
847937 |
auth_dontaudit_write_login_records($1_t)
|
|
Chris PeBenito |
847937 |
|
|
Chris PeBenito |
847937 |
application_exec_all($1_t)
|
|
Chris PeBenito |
847937 |
|
|
Chris PeBenito |
847937 |
# The library functions always try to open read-write first,
|
|
Chris PeBenito |
847937 |
# then fall back to read-only if it fails.
|
|
Chris PeBenito |
847937 |
init_dontaudit_rw_utmp($1_t)
|
|
Chris PeBenito |
847937 |
# Stop warnings about access to /dev/console
|
|
Chris PeBenito |
847937 |
init_dontaudit_use_fds($1_t)
|
|
Chris PeBenito |
847937 |
init_dontaudit_use_script_fds($1_t)
|
|
Chris PeBenito |
847937 |
|
|
Chris PeBenito |
847937 |
libs_exec_lib_files($1_t)
|
|
Chris PeBenito |
847937 |
|
|
Chris PeBenito |
847937 |
logging_dontaudit_getattr_all_logs($1_t)
|
|
Chris PeBenito |
847937 |
|
|
Chris PeBenito |
847937 |
miscfiles_read_man_pages($1_t)
|
|
Chris PeBenito |
847937 |
# for running TeX programs
|
|
Chris PeBenito |
847937 |
miscfiles_read_tetex_data($1_t)
|
|
Chris PeBenito |
847937 |
miscfiles_exec_tetex_data($1_t)
|
|
Chris PeBenito |
847937 |
|
|
Chris PeBenito |
847937 |
seutil_read_config($1_t)
|
|
Chris PeBenito |
847937 |
|
|
Chris PeBenito |
847937 |
optional_policy(`
|
|
Chris PeBenito |
847937 |
cups_read_config($1_t)
|
|
Chris PeBenito |
847937 |
cups_stream_connect($1_t)
|
|
Chris PeBenito |
847937 |
cups_stream_connect_ptal($1_t)
|
|
Chris PeBenito |
847937 |
')
|
|
Chris PeBenito |
847937 |
|
|
Chris PeBenito |
847937 |
optional_policy(`
|
|
Chris PeBenito |
847937 |
kerberos_use($1_t)
|
|
Chris PeBenito |
847937 |
')
|
|
Chris PeBenito |
847937 |
|
|
Chris PeBenito |
847937 |
optional_policy(`
|
|
Chris PeBenito |
847937 |
mta_dontaudit_read_spool_symlinks($1_t)
|
|
Chris PeBenito |
847937 |
')
|
|
Chris PeBenito |
847937 |
|
|
Chris PeBenito |
847937 |
optional_policy(`
|
|
Chris PeBenito |
847937 |
quota_dontaudit_getattr_db($1_t)
|
|
Chris PeBenito |
847937 |
')
|
|
Chris PeBenito |
847937 |
|
|
Chris PeBenito |
847937 |
optional_policy(`
|
|
Chris PeBenito |
847937 |
rpm_read_db($1_t)
|
|
Chris PeBenito |
847937 |
rpm_dontaudit_manage_db($1_t)
|
|
Chris PeBenito |
847937 |
')
|
|
Chris PeBenito |
847937 |
')
|
|
Chris PeBenito |
847937 |
|
|
Chris PeBenito |
847937 |
#######################################
|
|
Chris PeBenito |
847937 |
## <summary>
|
|
Chris PeBenito |
847937 |
## The template for creating a unprivileged login user.
|
|
Chris PeBenito |
847937 |
## </summary>
|
|
Chris PeBenito |
847937 |
## <desc>
|
|
Chris PeBenito |
847937 |
##
|
|
Chris PeBenito |
847937 |
## This template creates a user domain, types, and
|
|
Chris PeBenito |
847937 |
## rules for the user's tty, pty, home directories,
|
|
Chris PeBenito |
847937 |
## tmp, and tmpfs files.
|
|
Chris PeBenito |
847937 |
##
|
|
Chris PeBenito |
847937 |
## </desc>
|
|
Chris PeBenito |
847937 |
## <param name="userdomain_prefix">
|
|
Chris PeBenito |
847937 |
## <summary>
|
|
Chris PeBenito |
847937 |
## The prefix of the user domain (e.g., user
|
|
Chris PeBenito |
847937 |
## is the prefix for user_t).
|
|
Chris PeBenito |
847937 |
## </summary>
|
|
Chris PeBenito |
847937 |
## </param>
|
|
Chris PeBenito |
847937 |
#
|
|
Chris PeBenito |
847937 |
template(`userdom_restricted_user_template',`
|
|
Chris PeBenito |
847937 |
gen_require(`
|
|
Chris PeBenito |
847937 |
attribute unpriv_userdomain;
|
|
Chris PeBenito |
847937 |
')
|
|
Chris PeBenito |
847937 |
|
|
Chris PeBenito |
847937 |
userdom_login_user_template($1)
|
|
Chris PeBenito |
b16c6b |
|
|
Chris PeBenito |
0f707d |
typeattribute $1_t unpriv_userdomain;
|
|
Chris PeBenito |
15722e |
domain_interactive_fd($1_t)
|
|
Chris PeBenito |
b16c6b |
|
|
Chris PeBenito |
0c73cd |
##############################
|
|
Chris PeBenito |
0c73cd |
#
|
|
Chris PeBenito |
0c73cd |
# Local policy
|
|
Chris PeBenito |
0c73cd |
#
|
|
Chris PeBenito |
0c73cd |
|
|
Chris PeBenito |
847937 |
optional_policy(`
|
|
Chris PeBenito |
296273 |
loadkeys_run($1_t,$1_r)
|
|
Chris PeBenito |
847937 |
')
|
|
Chris PeBenito |
847937 |
')
|
|
Chris PeBenito |
847937 |
|
|
Chris PeBenito |
847937 |
#######################################
|
|
Chris PeBenito |
847937 |
## <summary>
|
|
Chris PeBenito |
847937 |
## The template for creating a unprivileged xwindows login user.
|
|
Chris PeBenito |
847937 |
## </summary>
|
|
Chris PeBenito |
847937 |
## <desc>
|
|
Chris PeBenito |
847937 |
##
|
|
Chris PeBenito |
847937 |
## The template for creating a unprivileged xwindows login user.
|
|
Chris PeBenito |
847937 |
##
|
|
Chris PeBenito |
847937 |
##
|
|
Chris PeBenito |
847937 |
## This template creates a user domain, types, and
|
|
Chris PeBenito |
847937 |
## rules for the user's tty, pty, home directories,
|
|
Chris PeBenito |
847937 |
## tmp, and tmpfs files.
|
|
Chris PeBenito |
847937 |
##
|
|
Chris PeBenito |
847937 |
## </desc>
|
|
Chris PeBenito |
847937 |
## <param name="userdomain_prefix">
|
|
Chris PeBenito |
847937 |
## <summary>
|
|
Chris PeBenito |
847937 |
## The prefix of the user domain (e.g., user
|
|
Chris PeBenito |
847937 |
## is the prefix for user_t).
|
|
Chris PeBenito |
847937 |
## </summary>
|
|
Chris PeBenito |
847937 |
## </param>
|
|
Chris PeBenito |
847937 |
#
|
|
Chris PeBenito |
847937 |
template(`userdom_restricted_xwindows_user_template',`
|
|
Chris PeBenito |
847937 |
|
|
Chris PeBenito |
847937 |
userdom_restricted_user_template($1)
|
|
Chris PeBenito |
847937 |
|
|
Chris PeBenito |
847937 |
userdom_xwindows_client_template($1)
|
|
Chris PeBenito |
847937 |
|
|
Chris PeBenito |
847937 |
##############################
|
|
Chris PeBenito |
847937 |
#
|
|
Chris PeBenito |
847937 |
# Local policy
|
|
Chris PeBenito |
847937 |
#
|
|
Chris PeBenito |
847937 |
|
|
Chris PeBenito |
296273 |
auth_role($1_r, $1_t)
|
|
Chris PeBenito |
847937 |
auth_search_pam_console_data($1_t)
|
|
Chris PeBenito |
847937 |
|
|
Chris PeBenito |
847937 |
dev_read_sound($1_t)
|
|
Chris PeBenito |
847937 |
dev_write_sound($1_t)
|
|
Chris PeBenito |
847937 |
# gnome keyring wants to read this.
|
|
Chris PeBenito |
847937 |
dev_dontaudit_read_rand($1_t)
|
|
Chris PeBenito |
847937 |
|
|
Chris PeBenito |
847937 |
logging_send_syslog_msg($1_t)
|
|
Chris PeBenito |
847937 |
logging_dontaudit_send_audit_msgs($1_t)
|
|
Chris PeBenito |
847937 |
|
|
Chris PeBenito |
847937 |
# Need to to this just so screensaver will work. Should be moved to screensaver domain
|
|
Chris PeBenito |
847937 |
logging_send_audit_msgs($1_t)
|
|
Chris PeBenito |
847937 |
selinux_get_enforce_mode($1_t)
|
|
Chris PeBenito |
847937 |
|
|
Chris PeBenito |
847937 |
optional_policy(`
|
|
Chris PeBenito |
847937 |
alsa_read_rw_config($1_t)
|
|
Chris PeBenito |
847937 |
')
|
|
Chris PeBenito |
847937 |
|
|
Chris PeBenito |
847937 |
optional_policy(`
|
|
Chris PeBenito |
296273 |
dbus_role_template($1, $1_r, $1_t)
|
|
Chris PeBenito |
296273 |
dbus_system_bus_client($1_t)
|
|
Chris PeBenito |
847937 |
|
|
Chris PeBenito |
847937 |
optional_policy(`
|
|
Chris PeBenito |
847937 |
consolekit_dbus_chat($1_t)
|
|
Chris PeBenito |
847937 |
')
|
|
Chris PeBenito |
847937 |
|
|
Chris PeBenito |
847937 |
optional_policy(`
|
|
Chris PeBenito |
847937 |
cups_dbus_chat($1_t)
|
|
Chris PeBenito |
847937 |
')
|
|
Chris PeBenito |
847937 |
')
|
|
Chris PeBenito |
847937 |
|
|
Chris PeBenito |
847937 |
optional_policy(`
|
|
Chris PeBenito |
296273 |
java_role($1_r, $1_t)
|
|
Chris PeBenito |
847937 |
')
|
|
Chris PeBenito |
847937 |
|
|
Chris PeBenito |
847937 |
optional_policy(`
|
|
Chris PeBenito |
847937 |
setroubleshoot_dontaudit_stream_connect($1_t)
|
|
Chris PeBenito |
847937 |
')
|
|
Chris PeBenito |
847937 |
')
|
|
Chris PeBenito |
847937 |
|
|
Chris PeBenito |
847937 |
#######################################
|
|
Chris PeBenito |
847937 |
## <summary>
|
|
Chris PeBenito |
847937 |
## The template for creating a unprivileged user roughly
|
|
Chris PeBenito |
847937 |
## equivalent to a regular linux user.
|
|
Chris PeBenito |
847937 |
## </summary>
|
|
Chris PeBenito |
847937 |
## <desc>
|
|
Chris PeBenito |
847937 |
##
|
|
Chris PeBenito |
847937 |
## The template for creating a unprivileged user roughly
|
|
Chris PeBenito |
847937 |
## equivalent to a regular linux user.
|
|
Chris PeBenito |
847937 |
##
|
|
Chris PeBenito |
847937 |
##
|
|
Chris PeBenito |
847937 |
## This template creates a user domain, types, and
|
|
Chris PeBenito |
847937 |
## rules for the user's tty, pty, home directories,
|
|
Chris PeBenito |
847937 |
## tmp, and tmpfs files.
|
|
Chris PeBenito |
847937 |
##
|
|
Chris PeBenito |
847937 |
## </desc>
|
|
Chris PeBenito |
847937 |
## <param name="userdomain_prefix">
|
|
Chris PeBenito |
847937 |
## <summary>
|
|
Chris PeBenito |
847937 |
## The prefix of the user domain (e.g., user
|
|
Chris PeBenito |
847937 |
## is the prefix for user_t).
|
|
Chris PeBenito |
847937 |
## </summary>
|
|
Chris PeBenito |
847937 |
## </param>
|
|
Chris PeBenito |
847937 |
#
|
|
Chris PeBenito |
847937 |
template(`userdom_unpriv_user_template', `
|
|
Chris PeBenito |
847937 |
|
|
Chris PeBenito |
847937 |
##############################
|
|
Chris PeBenito |
847937 |
#
|
|
Chris PeBenito |
847937 |
# Declarations
|
|
Chris PeBenito |
847937 |
#
|
|
Chris PeBenito |
847937 |
|
|
Chris PeBenito |
847937 |
# Inherit rules for ordinary users.
|
|
Chris PeBenito |
847937 |
userdom_restricted_user_template($1)
|
|
Chris PeBenito |
847937 |
userdom_common_user_template($1)
|
|
Chris PeBenito |
847937 |
|
|
Chris PeBenito |
847937 |
##############################
|
|
Chris PeBenito |
847937 |
#
|
|
Chris PeBenito |
847937 |
# Local policy
|
|
Chris PeBenito |
847937 |
#
|
|
Chris PeBenito |
0c73cd |
|
|
Chris PeBenito |
0c73cd |
# port access is audited even if dac would not have allowed it, so dontaudit it here
|
|
Chris PeBenito |
0fd9dc |
corenet_dontaudit_tcp_bind_all_reserved_ports($1_t)
|
|
Chris PeBenito |
bbcd3c |
# Need the following rule to allow users to run vpnc
|
|
Chris PeBenito |
bbcd3c |
corenet_tcp_bind_xserver_port($1_t)
|
|
Chris PeBenito |
0c73cd |
|
|
Chris PeBenito |
2ec4c9 |
files_exec_usr_files($1_t)
|
|
Chris PeBenito |
fb63d0 |
# cjp: why?
|
|
Chris PeBenito |
fb63d0 |
files_read_kernel_symbol_table($1_t)
|
|
Chris PeBenito |
0c73cd |
|
|
Chris PeBenito |
bbcd3c |
ifndef(`enable_mls',`
|
|
Chris PeBenito |
bbcd3c |
fs_exec_noxattr($1_t)
|
|
Chris PeBenito |
0c73cd |
|
|
Chris PeBenito |
bbcd3c |
tunable_policy(`user_rw_noexattrfile',`
|
|
Chris PeBenito |
bbcd3c |
fs_manage_noxattr_fs_files($1_t)
|
|
Chris PeBenito |
bbcd3c |
fs_manage_noxattr_fs_dirs($1_t)
|
|
Chris PeBenito |
bbcd3c |
# Write floppies
|
|
Chris PeBenito |
bbcd3c |
storage_raw_read_removable_device($1_t)
|
|
Chris PeBenito |
bbcd3c |
storage_raw_write_removable_device($1_t)
|
|
Chris PeBenito |
bbcd3c |
',`
|
|
Chris PeBenito |
bbcd3c |
storage_raw_read_removable_device($1_t)
|
|
Chris PeBenito |
bbcd3c |
')
|
|
Chris PeBenito |
a1fcff |
')
|
|
Chris PeBenito |
a1fcff |
|
|
Chris PeBenito |
34c8fa |
tunable_policy(`user_dmesg',`
|
|
Chris PeBenito |
0c73cd |
kernel_read_ring_buffer($1_t)
|
|
Chris PeBenito |
34c8fa |
',`
|
|
Chris PeBenito |
0fd9dc |
kernel_dontaudit_read_ring_buffer($1_t)
|
|
Chris PeBenito |
34c8fa |
')
|
|
Chris PeBenito |
0c73cd |
|
|
Chris PeBenito |
0c73cd |
# Allow users to run TCP servers (bind to ports and accept connection from
|
|
Chris PeBenito |
6073ea |
# the same domain and outside users) disabling this forces FTP passive mode
|
|
Chris PeBenito |
0c73cd |
# and may change other protocols
|
|
Chris PeBenito |
34c8fa |
tunable_policy(`user_tcp_server',`
|
|
Chris PeBenito |
0d96ff |
corenet_tcp_bind_all_nodes($1_t)
|
|
Chris PeBenito |
0fd9dc |
corenet_tcp_bind_generic_port($1_t)
|
|
Chris PeBenito |
34c8fa |
')
|
|
Chris PeBenito |
0c73cd |
|
|
Chris PeBenito |
bb7170 |
optional_policy(`
|
|
Chris PeBenito |
296273 |
netutils_run_ping_cond($1_t,$1_r)
|
|
Chris PeBenito |
296273 |
netutils_run_traceroute_cond($1_t,$1_r)
|
|
Chris PeBenito |
1f91e1 |
')
|
|
Chris PeBenito |
1f91e1 |
|
|
Chris PeBenito |
e8cb08 |
optional_policy(`
|
|
Chris PeBenito |
296273 |
postgresql_role($1_r,$1_t)
|
|
Chris PeBenito |
e8cb08 |
')
|
|
Chris PeBenito |
e8cb08 |
|
|
Chris PeBenito |
e08118 |
# Run pppd in pppd_t by default for user
|
|
Chris PeBenito |
bb7170 |
optional_policy(`
|
|
Chris PeBenito |
296273 |
ppp_run_cond($1_t,$1_r)
|
|
Chris PeBenito |
e08118 |
')
|
|
Chris PeBenito |
e08118 |
|
|
Chris PeBenito |
6b19be |
optional_policy(`
|
|
Chris PeBenito |
6b19be |
setroubleshoot_stream_connect($1_t)
|
|
Chris PeBenito |
6b19be |
')
|
|
Chris PeBenito |
b16c6b |
')
|
|
Chris PeBenito |
4d8ddf |
|
|
Chris PeBenito |
8fd367 |
#######################################
|
|
Chris PeBenito |
8fd367 |
## <summary>
|
|
Chris PeBenito |
8fd367 |
## The template for creating an administrative user.
|
|
Chris PeBenito |
8fd367 |
## </summary>
|
|
Chris PeBenito |
8fd367 |
## <desc>
|
|
Chris PeBenito |
8fd367 |
##
|
|
Chris PeBenito |
8fd367 |
## This template creates a user domain, types, and
|
|
Chris PeBenito |
8fd367 |
## rules for the user's tty, pty, home directories,
|
|
Chris PeBenito |
8fd367 |
## tmp, and tmpfs files.
|
|
Chris PeBenito |
8fd367 |
##
|
|
Chris PeBenito |
2ec4c9 |
##
|
|
Chris PeBenito |
8fd367 |
## The privileges given to administrative users are:
|
|
Chris PeBenito |
8fd367 |
##
|
|
Chris PeBenito |
8fd367 |
## Raw disk access
|
|
Chris PeBenito |
8fd367 |
## Set all sysctls
|
|
Chris PeBenito |
8fd367 |
## All kernel ring buffer controls
|
|
Chris PeBenito |
8fd367 |
## Create, read, write, and delete all files but shadow
|
|
Chris PeBenito |
8fd367 |
## Manage source and binary format SELinux policy
|
|
Chris PeBenito |
8fd367 |
## Run insmod
|
|
Chris PeBenito |
8fd367 |
##
|
|
Chris PeBenito |
2ec4c9 |
##
|
|
Chris PeBenito |
2ec4c9 |
## </desc>
|
|
Chris PeBenito |
8fd367 |
## <param name="userdomain_prefix">
|
|
Chris PeBenito |
885b83 |
## <summary>
|
|
Chris PeBenito |
8fd367 |
## The prefix of the user domain (e.g., sysadm
|
|
Chris PeBenito |
8fd367 |
## is the prefix for sysadm_t).
|
|
Chris PeBenito |
885b83 |
## </summary>
|
|
Chris PeBenito |
8fd367 |
## </param>
|
|
Chris PeBenito |
4d8ddf |
#
|
|
Chris PeBenito |
bbcd3c |
template(`userdom_admin_user_template',`
|
|
Chris PeBenito |
142e9f |
gen_require(`
|
|
Chris PeBenito |
296273 |
class passwd { passwd chfn chsh rootok };
|
|
Chris PeBenito |
142e9f |
')
|
|
Chris PeBenito |
142e9f |
|
|
Chris PeBenito |
0c73cd |
##############################
|
|
Chris PeBenito |
0c73cd |
#
|
|
Chris PeBenito |
0c73cd |
# Declarations
|
|
Chris PeBenito |
0c73cd |
#
|
|
Chris PeBenito |
0c73cd |
|
|
Chris PeBenito |
0c73cd |
# Inherit rules for ordinary users.
|
|
Chris PeBenito |
847937 |
userdom_login_user_template($1)
|
|
Chris PeBenito |
bbcd3c |
userdom_common_user_template($1)
|
|
Chris PeBenito |
0c73cd |
|
|
Chris PeBenito |
1815ba |
domain_obj_id_change_exemption($1_t)
|
|
Chris PeBenito |
0c73cd |
role system_r types $1_t;
|
|
Chris PeBenito |
0c73cd |
|
|
Chris PeBenito |
142e9f |
ifdef(`direct_sysadm_daemon',`
|
|
Chris PeBenito |
1815ba |
domain_system_change_exemption($1_t)
|
|
Chris PeBenito |
142e9f |
')
|
|
Chris PeBenito |
2a9837 |
|
|
Chris PeBenito |
0c73cd |
##############################
|
|
Chris PeBenito |
0c73cd |
#
|
|
Chris PeBenito |
0c73cd |
# $1_t local policy
|
|
Chris PeBenito |
0c73cd |
#
|
|
Chris PeBenito |
0c73cd |
|
|
Chris PeBenito |
847937 |
allow $1_t self:capability ~{ sys_module audit_control audit_write };
|
|
Chris PeBenito |
0c73cd |
allow $1_t self:process { setexec setfscreate };
|
|
Chris PeBenito |
0c73cd |
|
|
Chris PeBenito |
0c73cd |
# Set password information for other users.
|
|
Chris PeBenito |
0c73cd |
allow $1_t self:passwd { passwd chfn chsh };
|
|
Chris PeBenito |
0c73cd |
|
|
Chris PeBenito |
0c73cd |
# Skip authentication when pam_rootok is specified.
|
|
Chris PeBenito |
0c73cd |
allow $1_t self:passwd rootok;
|
|
Chris PeBenito |
0c73cd |
|
|
Chris PeBenito |
a1fcff |
allow $1_t self:netlink_audit_socket nlmsg_readpriv;
|
|
Chris PeBenito |
a1fcff |
|
|
Chris PeBenito |
0c73cd |
kernel_read_software_raid_state($1_t)
|
|
Chris PeBenito |
445522 |
kernel_getattr_core_if($1_t)
|
|
Chris PeBenito |
0fd9dc |
kernel_getattr_message_if($1_t)
|
|
Chris PeBenito |
0c73cd |
kernel_change_ring_buffer_level($1_t)
|
|
Chris PeBenito |
0c73cd |
kernel_clear_ring_buffer($1_t)
|
|
Chris PeBenito |
0c73cd |
kernel_read_ring_buffer($1_t)
|
|
Chris PeBenito |
0c73cd |
kernel_get_sysvipc_info($1_t)
|
|
Chris PeBenito |
445522 |
kernel_rw_all_sysctls($1_t)
|
|
Chris PeBenito |
8fd367 |
# signal unlabeled processes:
|
|
Chris PeBenito |
8fd367 |
kernel_kill_unlabeled($1_t)
|
|
Chris PeBenito |
8fd367 |
kernel_signal_unlabeled($1_t)
|
|
Chris PeBenito |
8fd367 |
kernel_sigstop_unlabeled($1_t)
|
|
Chris PeBenito |
8fd367 |
kernel_signull_unlabeled($1_t)
|
|
Chris PeBenito |
8fd367 |
kernel_sigchld_unlabeled($1_t)
|
|
Chris PeBenito |
2ec4c9 |
|
|
Chris PeBenito |
2ec4c9 |
corenet_tcp_bind_generic_port($1_t)
|
|
Chris PeBenito |
2ec4c9 |
# allow setting up tunnels
|
|
Chris PeBenito |
5b6ddb |
corenet_rw_tun_tap_dev($1_t)
|
|
Chris PeBenito |
2ec4c9 |
|
|
Chris PeBenito |
207c47 |
dev_getattr_generic_blk_files($1_t)
|
|
Chris PeBenito |
207c47 |
dev_getattr_generic_chr_files($1_t)
|
|
Chris PeBenito |
bbcd3c |
# for lsof
|
|
Chris PeBenito |
bbcd3c |
dev_getattr_mtrr_dev($1_t)
|
|
Chris PeBenito |
bbcd3c |
# Allow MAKEDEV to work
|
|
Chris PeBenito |
bbcd3c |
dev_create_all_blk_files($1_t)
|
|
Chris PeBenito |
bbcd3c |
dev_create_all_chr_files($1_t)
|
|
Chris PeBenito |
bbcd3c |
dev_delete_all_blk_files($1_t)
|
|
Chris PeBenito |
bbcd3c |
dev_delete_all_chr_files($1_t)
|
|
Chris PeBenito |
bbcd3c |
dev_rename_all_blk_files($1_t)
|
|
Chris PeBenito |
bbcd3c |
dev_rename_all_chr_files($1_t)
|
|
Chris PeBenito |
bbcd3c |
dev_create_generic_symlinks($1_t)
|
|
Chris PeBenito |
0c73cd |
|
|
Chris PeBenito |
c9428d |
domain_setpriority_all_domains($1_t)
|
|
Chris PeBenito |
c9428d |
domain_read_all_domains_state($1_t)
|
|
Chris PeBenito |
ccc597 |
domain_getattr_all_domains($1_t)
|
|
Chris PeBenito |
ccc597 |
domain_dontaudit_ptrace_all_domains($1_t)
|
|
Chris PeBenito |
0c73cd |
# signal all domains:
|
|
Chris PeBenito |
0c73cd |
domain_kill_all_domains($1_t)
|
|
Chris PeBenito |
0c73cd |
domain_signal_all_domains($1_t)
|
|
Chris PeBenito |
0c73cd |
domain_signull_all_domains($1_t)
|
|
Chris PeBenito |
0c73cd |
domain_sigstop_all_domains($1_t)
|
|
Chris PeBenito |
0c73cd |
domain_sigstop_all_domains($1_t)
|
|
Chris PeBenito |
0c73cd |
domain_sigchld_all_domains($1_t)
|
|
Chris PeBenito |
2ec4c9 |
# for lsof
|
|
Chris PeBenito |
2ec4c9 |
domain_getattr_all_sockets($1_t)
|
|
Chris PeBenito |
0c73cd |
|
|
Chris PeBenito |
99505c |
files_exec_usr_src_files($1_t)
|
|
Chris PeBenito |
0c73cd |
|
|
Chris PeBenito |
bbcd3c |
fs_getattr_all_fs($1_t)
|
|
Chris PeBenito |
bbcd3c |
fs_set_all_quotas($1_t)
|
|
Chris PeBenito |
bbcd3c |
fs_exec_noxattr($1_t)
|
|
Chris PeBenito |
bbcd3c |
|
|
Chris PeBenito |
bbcd3c |
storage_raw_read_removable_device($1_t)
|
|
Chris PeBenito |
bbcd3c |
storage_raw_write_removable_device($1_t)
|
|
Chris PeBenito |
bbcd3c |
|
|
Chris PeBenito |
bbcd3c |
term_use_all_terms($1_t)
|
|
Chris PeBenito |
bbcd3c |
|
|
Chris PeBenito |
bbcd3c |
auth_getattr_shadow($1_t)
|
|
Chris PeBenito |
bbcd3c |
# Manage almost all files
|
|
Chris PeBenito |
bbcd3c |
auth_manage_all_files_except_shadow($1_t)
|
|
Chris PeBenito |
bbcd3c |
# Relabel almost all files
|
|
Chris PeBenito |
bbcd3c |
auth_relabel_all_files_except_shadow($1_t)
|
|
Chris PeBenito |
bbcd3c |
|
|
Chris PeBenito |
bbcd3c |
init_telinit($1_t)
|
|
Chris PeBenito |
0c73cd |
|
|
Chris PeBenito |
c9428d |
logging_send_syslog_msg($1_t)
|
|
Chris PeBenito |
0c73cd |
|
|
Chris PeBenito |
c9428d |
modutils_domtrans_insmod($1_t)
|
|
Chris PeBenito |
0c73cd |
|
|
Chris PeBenito |
0c73cd |
# The following rule is temporary until such time that a complete
|
|
Chris PeBenito |
0c73cd |
# policy management infrastructure is in place so that an administrator
|
|
Chris PeBenito |
0c73cd |
# cannot directly manipulate policy files with arbitrary programs.
|
|
Chris PeBenito |
1815ba |
seutil_manage_src_policy($1_t)
|
|
Chris PeBenito |
0c73cd |
# Violates the goal of limiting write access to checkpolicy.
|
|
Chris PeBenito |
0c73cd |
# But presently necessary for installing the file_contexts file.
|
|
Chris PeBenito |
1815ba |
seutil_manage_bin_policy($1_t)
|
|
Chris PeBenito |
0c73cd |
|
|
Chris PeBenito |
296273 |
userdom_manage_user_home_content_dirs($1_t)
|
|
Chris PeBenito |
296273 |
userdom_manage_user_home_content_files($1_t)
|
|
Chris PeBenito |
296273 |
userdom_manage_user_home_content_symlinks($1_t)
|
|
Chris PeBenito |
296273 |
userdom_manage_user_home_content_pipes($1_t)
|
|
Chris PeBenito |
296273 |
userdom_manage_user_home_content_sockets($1_t)
|
|
Chris PeBenito |
296273 |
userdom_user_home_dir_filetrans_user_home_content($1_t, { dir file lnk_file fifo_file sock_file })
|
|
Chris PeBenito |
296273 |
|
|
Chris PeBenito |
bbcd3c |
tunable_policy(`user_rw_noexattrfile',`
|
|
Chris PeBenito |
bbcd3c |
fs_manage_noxattr_fs_files($1_t)
|
|
Chris PeBenito |
bbcd3c |
fs_manage_noxattr_fs_dirs($1_t)
|
|
Chris PeBenito |
bbcd3c |
',`
|
|
Chris PeBenito |
bbcd3c |
fs_read_noxattr_fs_files($1_t)
|
|
Chris PeBenito |
bbcd3c |
')
|
|
Chris PeBenito |
bbcd3c |
|
|
Chris PeBenito |
bb7170 |
optional_policy(`
|
|
Chris PeBenito |
e8cb08 |
postgresql_unconfined($1_t)
|
|
Chris PeBenito |
e8cb08 |
')
|
|
Chris PeBenito |
e8cb08 |
|
|
Chris PeBenito |
e8cb08 |
optional_policy(`
|
|
Chris PeBenito |
6b19be |
userhelper_exec($1_t)
|
|
Chris PeBenito |
6b19be |
')
|
|
Chris PeBenito |
6b19be |
')
|
|
Chris PeBenito |
6b19be |
|
|
Chris PeBenito |
6b19be |
########################################
|
|
Chris PeBenito |
6b19be |
## <summary>
|
|
Chris PeBenito |
6b19be |
## Allow user to run as a secadm
|
|
Chris PeBenito |
6b19be |
## </summary>
|
|
Chris PeBenito |
6b19be |
## <desc>
|
|
Chris PeBenito |
6b19be |
##
|
|
Chris PeBenito |
6b19be |
## Create objects in a user home directory
|
|
Chris PeBenito |
6b19be |
## with an automatic type transition to
|
|
Chris PeBenito |
6b19be |
## a specified private type.
|
|
Chris PeBenito |
6b19be |
##
|
|
Chris PeBenito |
6b19be |
##
|
|
Chris PeBenito |
6b19be |
## This is a templated interface, and should only
|
|
Chris PeBenito |
6b19be |
## be called from a per-userdomain template.
|
|
Chris PeBenito |
6b19be |
##
|
|
Chris PeBenito |
6b19be |
## </desc>
|
|
Chris PeBenito |
6b19be |
## <param name="domain">
|
|
Chris PeBenito |
6b19be |
## <summary>
|
|
Chris PeBenito |
6b19be |
## Domain allowed access.
|
|
Chris PeBenito |
6b19be |
## </summary>
|
|
Chris PeBenito |
6b19be |
## </param>
|
|
Chris PeBenito |
6b19be |
## <param name="role">
|
|
Chris PeBenito |
6b19be |
## <summary>
|
|
Chris PeBenito |
6b19be |
## The role of the object to create.
|
|
Chris PeBenito |
6b19be |
## </summary>
|
|
Chris PeBenito |
6b19be |
## </param>
|
|
Chris PeBenito |
6b19be |
#
|
|
Chris PeBenito |
6b19be |
template(`userdom_security_admin_template',`
|
|
Chris PeBenito |
6b19be |
allow $1 self:capability { dac_read_search dac_override };
|
|
Chris PeBenito |
6b19be |
|
|
Chris PeBenito |
6b19be |
corecmd_exec_shell($1)
|
|
Chris PeBenito |
6b19be |
|
|
Chris PeBenito |
6b19be |
domain_obj_id_change_exemption($1)
|
|
Chris PeBenito |
6b19be |
|
|
Chris PeBenito |
6b19be |
dev_relabel_all_dev_nodes($1)
|
|
Chris PeBenito |
6b19be |
|
|
Chris PeBenito |
6b19be |
files_create_boot_flag($1)
|
|
Chris PeBenito |
6b19be |
|
|
Chris PeBenito |
6b19be |
# Necessary for managing /boot/efi
|
|
Chris PeBenito |
6b19be |
fs_manage_dos_files($1)
|
|
Chris PeBenito |
6b19be |
|
|
Chris PeBenito |
6b19be |
mls_process_read_up($1)
|
|
Chris PeBenito |
f8233a |
mls_file_read_all_levels($1)
|
|
Chris PeBenito |
6b19be |
mls_file_upgrade($1)
|
|
Chris PeBenito |
6b19be |
mls_file_downgrade($1)
|
|
Chris PeBenito |
6b19be |
|
|
Chris PeBenito |
6b19be |
selinux_set_enforce_mode($1)
|
|
Chris PeBenito |
6b19be |
selinux_set_boolean($1)
|
|
Chris PeBenito |
6b19be |
selinux_set_parameters($1)
|
|
Chris PeBenito |
6b19be |
|
|
Chris PeBenito |
6b19be |
auth_relabel_all_files_except_shadow($1)
|
|
Chris PeBenito |
6b19be |
auth_relabel_shadow($1)
|
|
Chris PeBenito |
6b19be |
|
|
Chris PeBenito |
6b19be |
init_exec($1)
|
|
Chris PeBenito |
6b19be |
|
|
Chris PeBenito |
6b19be |
logging_send_syslog_msg($1)
|
|
Chris PeBenito |
6b19be |
logging_read_audit_log($1)
|
|
Chris PeBenito |
6b19be |
logging_read_generic_logs($1)
|
|
Chris PeBenito |
6b19be |
logging_read_audit_config($1)
|
|
Chris PeBenito |
6b19be |
|
|
Chris PeBenito |
6b19be |
seutil_manage_bin_policy($1)
|
|
Chris PeBenito |
296273 |
seutil_run_checkpolicy($1,$2)
|
|
Chris PeBenito |
296273 |
seutil_run_loadpolicy($1,$2)
|
|
Chris PeBenito |
296273 |
seutil_run_semanage($1,$2)
|
|
Chris PeBenito |
296273 |
seutil_run_setfiles($1, $2)
|
|
Chris PeBenito |
6b19be |
|
|
Chris PeBenito |
6b19be |
optional_policy(`
|
|
Chris PeBenito |
296273 |
aide_run($1,$2)
|
|
Chris PeBenito |
6b19be |
')
|
|
Chris PeBenito |
6b19be |
|
|
Chris PeBenito |
6b19be |
optional_policy(`
|
|
Chris PeBenito |
6b19be |
consoletype_exec($1)
|
|
Chris PeBenito |
6b19be |
')
|
|
Chris PeBenito |
6b19be |
|
|
Chris PeBenito |
6b19be |
optional_policy(`
|
|
Chris PeBenito |
6b19be |
dmesg_exec($1)
|
|
Chris PeBenito |
6b19be |
')
|
|
Chris PeBenito |
6b19be |
|
|
Chris PeBenito |
9e8f65 |
optional_policy(`
|
|
Chris PeBenito |
296273 |
ipsec_run_setkey($1,$2)
|
|
Chris PeBenito |
9e8f65 |
')
|
|
Chris PeBenito |
9e8f65 |
|
|
Chris PeBenito |
6b19be |
optional_policy(`
|
|
Chris PeBenito |
296273 |
netlabel_run_mgmt($1,$2)
|
|
Chris PeBenito |
a1fcff |
')
|
|
Chris PeBenito |
4d8ddf |
')
|
|
Chris PeBenito |
490639 |
|
|
Chris PeBenito |
daa0e0 |
########################################
|
|
Chris PeBenito |
ab940a |
## <summary>
|
|
Chris PeBenito |
296273 |
## Make the specified type usable in a
|
|
Chris PeBenito |
296273 |
## user home directory.
|
|
Chris PeBenito |
b1bf2f |
## </summary>
|
|
Chris PeBenito |
296273 |
## <param name="type">
|
|
Chris PeBenito |
b1bf2f |
## <summary>
|
|
Chris PeBenito |
296273 |
## Type to be used as a file in the
|
|
Chris PeBenito |
296273 |
## user home directory.
|
|
Chris PeBenito |
b1bf2f |
## </summary>
|
|
Chris PeBenito |
b1bf2f |
## </param>
|
|
Chris PeBenito |
b1bf2f |
#
|
|
Chris PeBenito |
296273 |
interface(`userdom_user_home_content',`
|
|
Chris PeBenito |
296273 |
gen_require(`
|
|
Chris PeBenito |
296273 |
type user_home_t;
|
|
Chris PeBenito |
296273 |
')
|
|
Chris PeBenito |
296273 |
|
|
Chris PeBenito |
296273 |
allow $1 user_home_t:filesystem associate;
|
|
Chris PeBenito |
296273 |
files_type($1)
|
|
Chris PeBenito |
296273 |
ubac_constrained($1)
|
|
Chris PeBenito |
b1bf2f |
')
|
|
Chris PeBenito |
b1bf2f |
|
|
Chris PeBenito |
b1bf2f |
########################################
|
|
Chris PeBenito |
b1bf2f |
## <summary>
|
|
Chris PeBenito |
296273 |
## Set the attributes of a user pty.
|
|
Chris PeBenito |
b1bf2f |
## </summary>
|
|
Chris PeBenito |
296273 |
## <param name="domain">
|
|
Chris PeBenito |
b1bf2f |
## <summary>
|
|
Chris PeBenito |
296273 |
## Domain allowed access.
|
|
Chris PeBenito |
b1bf2f |
## </summary>
|
|
Chris PeBenito |
b1bf2f |
## </param>
|
|
Chris PeBenito |
b1bf2f |
#
|
|
Chris PeBenito |
296273 |
interface(`userdom_setattr_user_ptys',`
|
|
Chris PeBenito |
296273 |
gen_require(`
|
|
Chris PeBenito |
296273 |
type user_devpts_t;
|
|
Chris PeBenito |
296273 |
')
|
|
Chris PeBenito |
296273 |
|
|
Chris PeBenito |
296273 |
allow $1 user_devpts_t:chr_file setattr;
|
|
Chris PeBenito |
b1bf2f |
')
|
|
Chris PeBenito |
b1bf2f |
|
|
Chris PeBenito |
b1bf2f |
########################################
|
|
Chris PeBenito |
b1bf2f |
## <summary>
|
|
Chris PeBenito |
296273 |
## Create a user pty.
|
|
Chris PeBenito |
b1bf2f |
## </summary>
|
|
Chris PeBenito |
296273 |
## <param name="domain">
|
|
Chris PeBenito |
b1bf2f |
## <summary>
|
|
Chris PeBenito |
296273 |
## Domain allowed access.
|
|
Chris PeBenito |
b1bf2f |
## </summary>
|
|
Chris PeBenito |
b1bf2f |
## </param>
|
|
Chris PeBenito |
b1bf2f |
#
|
|
Chris PeBenito |
296273 |
interface(`userdom_create_user_pty',`
|
|
Chris PeBenito |
296273 |
gen_require(`
|
|
Chris PeBenito |
296273 |
type user_devpts_t;
|
|
Chris PeBenito |
296273 |
')
|
|
Chris PeBenito |
296273 |
|
|
Chris PeBenito |
296273 |
term_create_pty($1, user_devpts_t)
|
|
Chris PeBenito |
b1bf2f |
')
|
|
Chris PeBenito |
b1bf2f |
|
|
Chris PeBenito |
b1bf2f |
########################################
|
|
Chris PeBenito |
b1bf2f |
## <summary>
|
|
Chris PeBenito |
296273 |
## Get the attributes of user home directories.
|
|
Chris PeBenito |
b1bf2f |
## </summary>
|
|
Chris PeBenito |
296273 |
## <param name="domain">
|
|
Chris PeBenito |
b1bf2f |
## <summary>
|
|
Chris PeBenito |
296273 |
## Domain allowed access.
|
|
Chris PeBenito |
b1bf2f |
## </summary>
|
|
Chris PeBenito |
b1bf2f |
## </param>
|
|
Chris PeBenito |
b1bf2f |
#
|
|
Chris PeBenito |
296273 |
interface(`userdom_getattr_user_home_dirs',`
|
|
Chris PeBenito |
296273 |
gen_require(`
|
|
Chris PeBenito |
296273 |
type user_home_dir_t;
|
|
Chris PeBenito |
296273 |
')
|
|
Chris PeBenito |
296273 |
|
|
Chris PeBenito |
296273 |
allow $1 user_home_dir_t:dir getattr_dir_perms;
|
|
Chris PeBenito |
296273 |
files_search_home($1)
|
|
Chris PeBenito |
b1bf2f |
')
|
|
Chris PeBenito |
b1bf2f |
|
|
Chris PeBenito |
b1bf2f |
########################################
|
|
Chris PeBenito |
b1bf2f |
## <summary>
|
|
Chris PeBenito |
296273 |
## Do not audit attempts to get the attributes of user home directories.
|
|
Chris PeBenito |
b1bf2f |
## </summary>
|
|
Chris PeBenito |
296273 |
## <param name="domain">
|
|
Chris PeBenito |
b1bf2f |
## <summary>
|
|
Chris PeBenito |
296273 |
## Domain allowed access.
|
|
Chris PeBenito |
b1bf2f |
## </summary>
|
|
Chris PeBenito |
b1bf2f |
## </param>
|
|
Chris PeBenito |
b1bf2f |
#
|
|
Chris PeBenito |
296273 |
interface(`userdom_dontaudit_getattr_user_home_dirs',`
|
|
Chris PeBenito |
296273 |
gen_require(`
|
|
Chris PeBenito |
296273 |
type user_home_dir_t;
|
|
Chris PeBenito |
296273 |
')
|
|
Chris PeBenito |
296273 |
|
|
Chris PeBenito |
296273 |
dontaudit $1 user_home_dir_t:dir getattr_dir_perms;
|
|
Chris PeBenito |
b1bf2f |
')
|
|
Chris PeBenito |
b1bf2f |
|
|
Chris PeBenito |
b1bf2f |
########################################
|
|
Chris PeBenito |
b1bf2f |
## <summary>
|
|
Chris PeBenito |
296273 |
## Search user home directories.
|
|
Chris PeBenito |
b1bf2f |
## </summary>
|
|
Chris PeBenito |
296273 |
## <param name="domain">
|
|
Chris PeBenito |
b1bf2f |
## <summary>
|
|
Chris PeBenito |
296273 |
## Domain allowed access.
|
|
Chris PeBenito |
b1bf2f |
## </summary>
|
|
Chris PeBenito |
b1bf2f |
## </param>
|
|
Chris PeBenito |
b1bf2f |
#
|
|
Chris PeBenito |
296273 |
interface(`userdom_search_user_home_dirs',`
|
|
Chris PeBenito |
296273 |
gen_require(`
|
|
Chris PeBenito |
296273 |
type user_home_dir_t;
|
|
Chris PeBenito |
296273 |
')
|
|
Chris PeBenito |
296273 |
|
|
Chris PeBenito |
296273 |
allow $1 user_home_dir_t:dir search_dir_perms;
|
|
Chris PeBenito |
296273 |
files_search_home($1)
|
|
Chris PeBenito |
b1bf2f |
')
|
|
Chris PeBenito |
b1bf2f |
|
|
Chris PeBenito |
b1bf2f |
########################################
|
|
Chris PeBenito |
b1bf2f |
## <summary>
|
|
Chris PeBenito |
296273 |
## Search user home directories.
|
|
Chris PeBenito |
b1bf2f |
## </summary>
|
|
Chris PeBenito |
296273 |
## <param name="domain">
|
|
Chris PeBenito |
b1bf2f |
## <summary>
|
|
Chris PeBenito |
296273 |
## Domain allowed access.
|
|
Chris PeBenito |
b1bf2f |
## </summary>
|
|
Chris PeBenito |
b1bf2f |
## </param>
|
|
Chris PeBenito |
b1bf2f |
#
|
|
Chris PeBenito |
296273 |
interface(`userdom_dontaudit_search_user_home_dirs',`
|
|
Chris PeBenito |
296273 |
gen_require(`
|
|
Chris PeBenito |
296273 |
type user_home_dir_t;
|
|
Chris PeBenito |
296273 |
')
|
|
Chris PeBenito |
296273 |
|
|
Chris PeBenito |
296273 |
dontaudit $1 user_home_dir_t:dir search_dir_perms;
|
|
Chris PeBenito |
b1bf2f |
')
|
|
Chris PeBenito |
b1bf2f |
|
|
Chris PeBenito |
b1bf2f |
########################################
|
|
Chris PeBenito |
b1bf2f |
## <summary>
|
|
Chris PeBenito |
296273 |
## List user home directories.
|
|
Chris PeBenito |
b1bf2f |
## </summary>
|
|
Chris PeBenito |
296273 |
## <param name="domain">
|
|
Chris PeBenito |
b1bf2f |
## <summary>
|
|
Chris PeBenito |
296273 |
## Domain allowed access.
|
|
Chris PeBenito |
b1bf2f |
## </summary>
|
|
Chris PeBenito |
b1bf2f |
## </param>
|
|
Chris PeBenito |
b1bf2f |
#
|
|
Chris PeBenito |
296273 |
interface(`userdom_list_user_home_dirs',`
|
|
Chris PeBenito |
296273 |
gen_require(`
|
|
Chris PeBenito |
296273 |
type user_home_dir_t;
|
|
Chris PeBenito |
296273 |
')
|
|
Chris PeBenito |
b1bf2f |
|
|
Chris PeBenito |
296273 |
allow $1 user_home_dir_t:dir list_dir_perms;
|
|
Chris PeBenito |
296273 |
files_search_home($1)
|
|
Chris PeBenito |
de8af9 |
')
|
|
Chris PeBenito |
de8af9 |
|
|
Chris PeBenito |
de8af9 |
########################################
|
|
Chris PeBenito |
de8af9 |
## <summary>
|
|
Chris PeBenito |
296273 |
## Do not audit attempts to list user home subdirectories.
|
|
Chris PeBenito |
7c2f5a |
## </summary>
|
|
Chris PeBenito |
7c2f5a |
## <param name="domain">
|
|
Chris PeBenito |
885b83 |
## <summary>
|
|
Chris PeBenito |
296273 |
## Domain to not audit
|
|
Chris PeBenito |
885b83 |
## </summary>
|
|
Chris PeBenito |
7c2f5a |
## </param>
|
|
Chris PeBenito |
7c2f5a |
#
|
|
Chris PeBenito |
296273 |
interface(`userdom_dontaudit_list_user_home_dirs',`
|
|
Chris PeBenito |
7c2f5a |
gen_require(`
|
|
Chris PeBenito |
296273 |
type user_home_dir_t;
|
|
Chris PeBenito |
7c2f5a |
')
|
|
Chris PeBenito |
7c2f5a |
|
|
Chris PeBenito |
296273 |
dontaudit $1 user_home_dir_t:dir list_dir_perms;
|
|
Chris PeBenito |
7c2f5a |
')
|
|
Chris PeBenito |
7c2f5a |
|
|
Chris PeBenito |
7c2f5a |
########################################
|
|
Chris PeBenito |
7c2f5a |
## <summary>
|
|
Chris PeBenito |
296273 |
## Create user home directories.
|
|
Chris PeBenito |
7c2f5a |
## </summary>
|
|
Chris PeBenito |
7c2f5a |
## <param name="domain">
|
|
Chris PeBenito |
885b83 |
## <summary>
|
|
Chris PeBenito |
7c2f5a |
## Domain allowed access.
|
|
Chris PeBenito |
885b83 |
## </summary>
|
|
Chris PeBenito |
7c2f5a |
## </param>
|
|
Chris PeBenito |
7c2f5a |
#
|
|
Chris PeBenito |
296273 |
interface(`userdom_create_user_home_dirs',`
|
|
Chris PeBenito |
296273 |
gen_require(`
|
|
Chris PeBenito |
296273 |
type user_home_dir_t;
|
|
Chris PeBenito |
296273 |
')
|
|
Chris PeBenito |
296273 |
|
|
Chris PeBenito |
296273 |
allow $1 user_home_dir_t:dir create_dir_perms;
|
|
Chris PeBenito |
7c2f5a |
')
|
|
Chris PeBenito |
7c2f5a |
|
|
Chris PeBenito |
7c2f5a |
########################################
|
|
Chris PeBenito |
7c2f5a |
## <summary>
|
|
Chris PeBenito |
296273 |
## Create user home directories.
|
|
Chris PeBenito |
7c2f5a |
## </summary>
|
|
Chris PeBenito |
7c2f5a |
## <param name="domain">
|
|
Chris PeBenito |
885b83 |
## <summary>
|
|
Chris PeBenito |
7c2f5a |
## Domain allowed access.
|
|
Chris PeBenito |
885b83 |
## </summary>
|
|
Chris PeBenito |
7c2f5a |
## </param>
|
|
Chris PeBenito |
7c2f5a |
#
|
|
Chris PeBenito |
296273 |
interface(`userdom_manage_user_home_dirs',`
|
|
Chris PeBenito |
7c2f5a |
gen_require(`
|
|
Chris PeBenito |
296273 |
type user_home_dir_t;
|
|
Chris PeBenito |
7c2f5a |
')
|
|
Chris PeBenito |
7c2f5a |
|
|
Chris PeBenito |
296273 |
allow $1 user_home_dir_t:dir manage_dir_perms;
|
|
Chris PeBenito |
7c2f5a |
')
|
|
Chris PeBenito |
7c2f5a |
|
|
Chris PeBenito |
7c2f5a |
########################################
|
|
Chris PeBenito |
7c2f5a |
## <summary>
|
|
Chris PeBenito |
296273 |
## Relabel to user home directories.
|
|
Chris PeBenito |
ab940a |
## </summary>
|
|
Chris PeBenito |
414e41 |
## <param name="domain">
|
|
Chris PeBenito |
885b83 |
## <summary>
|
|
Chris PeBenito |
725926 |
## Domain allowed access.
|
|
Chris PeBenito |
885b83 |
## </summary>
|
|
Chris PeBenito |
414e41 |
## </param>
|
|
Chris PeBenito |
d490eb |
#
|
|
Chris PeBenito |
296273 |
interface(`userdom_relabelto_user_home_dirs',`
|
|
Chris PeBenito |
296273 |
gen_require(`
|
|
Chris PeBenito |
296273 |
type user_home_dir_t;
|
|
Chris PeBenito |
296273 |
')
|
|
Chris PeBenito |
d490eb |
|
|
Chris PeBenito |
296273 |
allow $1 user_home_dir_t:dir relabelto;
|
|
Chris PeBenito |
7c2f5a |
')
|
|
Chris PeBenito |
7c2f5a |
|
|
Chris PeBenito |
7c2f5a |
########################################
|
|
Chris PeBenito |
7c2f5a |
## <summary>
|
|
Chris PeBenito |
296273 |
## Create directories in the home dir root with
|
|
Chris PeBenito |
296273 |
## the user home directory type.
|
|
Chris PeBenito |
7c2f5a |
## </summary>
|
|
Chris PeBenito |
7c2f5a |
## <param name="domain">
|
|
Chris PeBenito |
885b83 |
## <summary>
|
|
Chris PeBenito |
7c2f5a |
## Domain allowed access.
|
|
Chris PeBenito |
885b83 |
## </summary>
|
|
Chris PeBenito |
7c2f5a |
## </param>
|
|
Chris PeBenito |
7c2f5a |
#
|
|
Chris PeBenito |
296273 |
interface(`userdom_home_filetrans_user_home_dir',`
|
|
Chris PeBenito |
296273 |
gen_require(`
|
|
Chris PeBenito |
296273 |
type user_home_dir_t;
|
|
Chris PeBenito |
296273 |
')
|
|
Chris PeBenito |
7c2f5a |
|
|
Chris PeBenito |
296273 |
files_home_filetrans($1, user_home_dir_t, dir)
|
|
Chris PeBenito |
7c2f5a |
')
|
|
Chris PeBenito |
7c2f5a |
|
|
Chris PeBenito |
7c2f5a |
########################################
|
|
Chris PeBenito |
7c2f5a |
## <summary>
|
|
Chris PeBenito |
296273 |
## Do a domain transition to the specified
|
|
Chris PeBenito |
296273 |
## domain when executing a program in the
|
|
Chris PeBenito |
296273 |
## user home directory.
|
|
Chris PeBenito |
d42c7e |
## </summary>
|
|
Chris PeBenito |
d42c7e |
## <desc>
|
|
Chris PeBenito |
d42c7e |
##
|
|
Chris PeBenito |
296273 |
## Do a domain transition to the specified
|
|
Chris PeBenito |
296273 |
## domain when executing a program in the
|
|
Chris PeBenito |
296273 |
## user home directory.
|
|
Chris PeBenito |
d42c7e |
##
|
|
Chris PeBenito |
d42c7e |
##
|
|
Chris PeBenito |
296273 |
## No interprocess communication (signals, pipes,
|
|
Chris PeBenito |
296273 |
## etc.) is provided by this interface since
|
|
Chris PeBenito |
296273 |
## the domains are not owned by this module.
|
|
Chris PeBenito |
d42c7e |
##
|
|
Chris PeBenito |
d42c7e |
## </desc>
|
|
Chris PeBenito |
296273 |
## <param name="source_domain">
|
|
Chris PeBenito |
d42c7e |
## <summary>
|
|
Chris PeBenito |
296273 |
## Domain allowed access.
|
|
Chris PeBenito |
d42c7e |
## </summary>
|
|
Chris PeBenito |
d42c7e |
## </param>
|
|
Chris PeBenito |
296273 |
## <param name="target_domain">
|
|
Chris PeBenito |
d42c7e |
## <summary>
|
|
Chris PeBenito |
296273 |
## Domain to transition to.
|
|
Chris PeBenito |
d42c7e |
## </summary>
|
|
Chris PeBenito |
d42c7e |
## </param>
|
|
Chris PeBenito |
d42c7e |
#
|
|
Chris PeBenito |
296273 |
interface(`userdom_user_home_domtrans',`
|
|
Chris PeBenito |
296273 |
gen_require(`
|
|
Chris PeBenito |
296273 |
type user_home_dir_t, user_home_t;
|
|
Chris PeBenito |
296273 |
')
|
|
Chris PeBenito |
d42c7e |
|
|
Chris PeBenito |
296273 |
domain_auto_trans($1, user_home_t, $2)
|
|
Chris PeBenito |
296273 |
allow $1 user_home_dir_t:dir search_dir_perms;
|
|
Chris PeBenito |
296273 |
files_search_home($1)
|
|
Chris PeBenito |
d42c7e |
')
|
|
Chris PeBenito |
d42c7e |
|
|
Chris PeBenito |
d42c7e |
########################################
|
|
Chris PeBenito |
d42c7e |
## <summary>
|
|
Chris PeBenito |
296273 |
## Do not audit attempts to search user home content directories.
|
|
Chris PeBenito |
ae9e27 |
## </summary>
|
|
Chris PeBenito |
ae9e27 |
## <param name="domain">
|
|
Chris PeBenito |
885b83 |
## <summary>
|
|
Chris PeBenito |
296273 |
## Domain to not audit
|
|
Chris PeBenito |
885b83 |
## </summary>
|
|
Chris PeBenito |
ae9e27 |
## </param>
|
|
Chris PeBenito |
ae9e27 |
#
|
|
Chris PeBenito |
296273 |
interface(`userdom_dontaudit_search_user_home_content',`
|
|
Chris PeBenito |
296273 |
gen_require(`
|
|
Chris PeBenito |
296273 |
type user_home_t;
|
|
Chris PeBenito |
296273 |
')
|
|
Chris PeBenito |
ae9e27 |
|
|
Chris PeBenito |
296273 |
dontaudit $1 user_home_t:dir search_dir_perms;
|
|
Chris PeBenito |
ae9e27 |
')
|
|
Chris PeBenito |
ae9e27 |
|
|
Chris PeBenito |
b0d224 |
########################################
|
|
Chris PeBenito |
b0d224 |
## <summary>
|
|
Chris PeBenito |
296273 |
## Create, read, write, and delete directories
|
|
Chris PeBenito |
296273 |
## in a user home subdirectory.
|
|
Chris PeBenito |
cdc86e |
## </summary>
|
|
Chris PeBenito |
cdc86e |
## <param name="domain">
|
|
Chris PeBenito |
cdc86e |
## <summary>
|
|
Chris PeBenito |
cdc86e |
## Domain allowed access.
|
|
Chris PeBenito |
cdc86e |
## </summary>
|
|
Chris PeBenito |
cdc86e |
## </param>
|
|
Chris PeBenito |
cdc86e |
#
|
|
Chris PeBenito |
296273 |
interface(`userdom_manage_user_home_content_dirs',`
|
|
Chris PeBenito |
296273 |
gen_require(`
|
|
Chris PeBenito |
296273 |
type user_home_dir_t, user_home_t;
|
|
Chris PeBenito |
296273 |
')
|
|
Chris PeBenito |
296273 |
|
|
Chris PeBenito |
296273 |
manage_dirs_pattern($1, { user_home_dir_t user_home_t }, user_home_t)
|
|
Chris PeBenito |
296273 |
files_search_home($1)
|
|
Chris PeBenito |
cdc86e |
')
|
|
Chris PeBenito |
cdc86e |
|
|
Chris PeBenito |
cdc86e |
########################################
|
|
Chris PeBenito |
cdc86e |
## <summary>
|
|
Chris PeBenito |
296273 |
## Do not audit attempts to set the
|
|
Chris PeBenito |
296273 |
## attributes of user home files.
|
|
Chris PeBenito |
d6d16b |
## </summary>
|
|
Chris PeBenito |
d6d16b |
## <param name="domain">
|
|
Chris PeBenito |
d6d16b |
## <summary>
|
|
Chris PeBenito |
d6d16b |
## Domain allowed access.
|
|
Chris PeBenito |
d6d16b |
## </summary>
|
|
Chris PeBenito |
d6d16b |
## </param>
|
|
Chris PeBenito |
d6d16b |
#
|
|
Chris PeBenito |
296273 |
interface(`userdom_dontaudit_setattr_user_home_content_files',`
|
|
Chris PeBenito |
296273 |
gen_require(`
|
|
Chris PeBenito |
296273 |
type user_home_t;
|
|
Chris PeBenito |
296273 |
')
|
|
Chris PeBenito |
d6d16b |
|
|
Chris PeBenito |
296273 |
dontaudit $1 user_home_t:file setattr;
|
|
Chris PeBenito |
b0d224 |
')
|
|
Chris PeBenito |
b0d224 |
|
|
Chris PeBenito |
ae9e27 |
########################################
|
|
Chris PeBenito |
ae9e27 |
## <summary>
|
|
Chris PeBenito |
296273 |
## Mmap user home files.
|
|
Chris PeBenito |
fd89e1 |
## </summary>
|
|
Chris PeBenito |
fd89e1 |
## <param name="domain">
|
|
Chris PeBenito |
885b83 |
## <summary>
|
|
Chris PeBenito |
725926 |
## Domain allowed access.
|
|
Chris PeBenito |
885b83 |
## </summary>
|
|
Chris PeBenito |
fd89e1 |
## </param>
|
|
Chris PeBenito |
fd89e1 |
#
|
|
Chris PeBenito |
296273 |
interface(`userdom_mmap_user_home_content_files',`
|
|
Chris PeBenito |
296273 |
gen_require(`
|
|
Chris PeBenito |
296273 |
type user_home_dir_t, user_home_t;
|
|
Chris PeBenito |
296273 |
')
|
|
Chris PeBenito |
fd89e1 |
|
|
Chris PeBenito |
296273 |
mmap_files_pattern($1, { user_home_dir_t user_home_t }, user_home_t)
|
|
Chris PeBenito |
296273 |
files_search_home($1)
|
|
Chris PeBenito |
1f91e1 |
')
|
|
Chris PeBenito |
1f91e1 |
|
|
Chris PeBenito |
1f91e1 |
########################################
|
|
Chris PeBenito |
1f91e1 |
## <summary>
|
|
Chris PeBenito |
296273 |
## Read user home files.
|
|
Chris PeBenito |
725926 |
## </summary>
|
|
Chris PeBenito |
725926 |
## <param name="domain">
|
|
Chris PeBenito |
885b83 |
## <summary>
|
|
Chris PeBenito |
725926 |
## Domain allowed access.
|
|
Chris PeBenito |
885b83 |
## </summary>
|
|
Chris PeBenito |
725926 |
## </param>
|
|
Chris PeBenito |
725926 |
#
|
|
Chris PeBenito |
296273 |
interface(`userdom_read_user_home_content_files',`
|
|
Chris PeBenito |
296273 |
gen_require(`
|
|
Chris PeBenito |
296273 |
type user_home_dir_t, user_home_t;
|
|
Chris PeBenito |
296273 |
')
|
|
Chris PeBenito |
296273 |
|
|
Chris PeBenito |
296273 |
read_files_pattern($1, { user_home_dir_t user_home_t }, user_home_t)
|
|
Chris PeBenito |
296273 |
files_search_home($1)
|
|
Chris PeBenito |
725926 |
')
|
|
Chris PeBenito |
725926 |
|
|
Chris PeBenito |
725926 |
########################################
|
|
Chris PeBenito |
725926 |
## <summary>
|
|
Chris PeBenito |
296273 |
## Do not audit attempts to read user home files.
|
|
Chris PeBenito |
ab940a |
## </summary>
|
|
Chris PeBenito |
414e41 |
## <param name="domain">
|
|
Chris PeBenito |
885b83 |
## <summary>
|
|
Chris PeBenito |
296273 |
## Domain to not audit.
|
|
Chris PeBenito |
885b83 |
## </summary>
|
|
Chris PeBenito |
414e41 |
## </param>
|
|
Chris PeBenito |
490639 |
#
|
|
Chris PeBenito |
296273 |
interface(`userdom_dontaudit_read_user_home_content_files',`
|
|
Chris PeBenito |
296273 |
gen_require(`
|
|
Chris PeBenito |
296273 |
type user_home_t;
|
|
Chris PeBenito |
296273 |
')
|
|
Chris PeBenito |
296273 |
|
|
Chris PeBenito |
296273 |
dontaudit $1 user_home_t:dir list_dir_perms;
|
|
Chris PeBenito |
296273 |
dontaudit $1 user_home_t:file read_file_perms;
|
|
Chris PeBenito |
fd89e1 |
')
|
|
Chris PeBenito |
fd89e1 |
|
|
Chris PeBenito |
fd89e1 |
########################################
|
|
Chris PeBenito |
fd89e1 |
## <summary>
|
|
Chris PeBenito |
296273 |
## Do not audit attempts to append user home files.
|
|
Chris PeBenito |
50aca6 |
## </summary>
|
|
Chris PeBenito |
50aca6 |
## <param name="domain">
|
|
Chris PeBenito |
885b83 |
## <summary>
|
|
Chris PeBenito |
50aca6 |
## Domain to not audit.
|
|
Chris PeBenito |
885b83 |
## </summary>
|
|
Chris PeBenito |
50aca6 |
## </param>
|
|
Chris PeBenito |
50aca6 |
#
|
|
Chris PeBenito |
296273 |
interface(`userdom_dontaudit_append_user_home_content_files',`
|
|
Chris PeBenito |
296273 |
gen_require(`
|
|
Chris PeBenito |
296273 |
type user_home_t;
|
|
Chris PeBenito |
296273 |
')
|
|
Chris PeBenito |
296273 |
|
|
Chris PeBenito |
296273 |
dontaudit $1 user_home_t:file append;
|
|
Chris PeBenito |
50aca6 |
')
|
|
Chris PeBenito |
50aca6 |
|
|
Chris PeBenito |
50aca6 |
########################################
|
|
Chris PeBenito |
50aca6 |
## <summary>
|
|
Chris PeBenito |
296273 |
## Do not audit attempts to write user home files.
|
|
Chris PeBenito |
fd89e1 |
## </summary>
|
|
Chris PeBenito |
fd89e1 |
## <param name="domain">
|
|
Chris PeBenito |
885b83 |
## <summary>
|
|
Chris PeBenito |
296273 |
## Domain to not audit.
|
|
Chris PeBenito |
885b83 |
## </summary>
|
|
Chris PeBenito |
fd89e1 |
## </param>
|
|
Chris PeBenito |
fd89e1 |
#
|
|
Chris PeBenito |
296273 |
interface(`userdom_dontaudit_write_user_home_content_files',`
|
|
Chris PeBenito |
296273 |
gen_require(`
|
|
Chris PeBenito |
296273 |
type user_home_t;
|
|
Chris PeBenito |
296273 |
')
|
|
Chris PeBenito |
296273 |
|
|
Chris PeBenito |
296273 |
dontaudit $1 user_home_t:file write;
|
|
Chris PeBenito |
daa0e0 |
')
|
|
Chris PeBenito |
daa0e0 |
|
|
Chris PeBenito |
0404a3 |
########################################
|
|
Chris PeBenito |
ab940a |
## <summary>
|
|
Chris PeBenito |
296273 |
## Do not audit attempts to write user home files.
|
|
Chris PeBenito |
d4dca5 |
## </summary>
|
|
Chris PeBenito |
d4dca5 |
## <param name="domain">
|
|
Chris PeBenito |
885b83 |
## <summary>
|
|
Chris PeBenito |
d4dca5 |
## Domain to not audit.
|
|
Chris PeBenito |
885b83 |
## </summary>
|
|
Chris PeBenito |
d4dca5 |
## </param>
|
|
Chris PeBenito |
d4dca5 |
#
|
|
Chris PeBenito |
296273 |
interface(`userdom_dontaudit_relabel_user_home_content_files',`
|
|
Chris PeBenito |
296273 |
gen_require(`
|
|
Chris PeBenito |
296273 |
type user_home_t;
|
|
Chris PeBenito |
296273 |
')
|
|
Chris PeBenito |
296273 |
|
|
Chris PeBenito |
296273 |
dontaudit $1 user_home_t:file relabel_file_perms;
|
|
Chris PeBenito |
d4dca5 |
')
|
|
Chris PeBenito |
d4dca5 |
|
|
Chris PeBenito |
d4dca5 |
########################################
|
|
Chris PeBenito |
d4dca5 |
## <summary>
|
|
Chris PeBenito |
296273 |
## Read user home subdirectory symbolic links.
|
|
Chris PeBenito |
ab940a |
## </summary>
|
|
Chris PeBenito |
414e41 |
## <param name="domain">
|
|
Chris PeBenito |
885b83 |
## <summary>
|
|
Chris PeBenito |
725926 |
## Domain allowed access.
|
|
Chris PeBenito |
885b83 |
## </summary>
|
|
Chris PeBenito |
414e41 |
## </param>
|
|
Chris PeBenito |
0404a3 |
#
|
|
Chris PeBenito |
296273 |
interface(`userdom_read_user_home_content_symlinks',`
|
|
Chris PeBenito |
296273 |
gen_require(`
|
|
Chris PeBenito |
296273 |
type user_home_dir_t, user_home_t;
|
|
Chris PeBenito |
296273 |
')
|
|
Chris PeBenito |
296273 |
|
|
Chris PeBenito |
296273 |
read_lnk_files_pattern($1, { user_home_dir_t user_home_t }, user_home_t)
|
|
Chris PeBenito |
296273 |
files_search_home($1)
|
|
Chris PeBenito |
daa0e0 |
')
|
|
Chris PeBenito |
daa0e0 |
|
|
Chris PeBenito |
daa0e0 |
########################################
|
|
Chris PeBenito |
ab940a |
## <summary>
|
|
Chris PeBenito |
296273 |
## Execute user home files.
|
|
Chris PeBenito |
ab940a |
## </summary>
|
|
Chris PeBenito |
414e41 |
## <param name="domain">
|
|
Chris PeBenito |
885b83 |
## <summary>
|
|
Chris PeBenito |
296273 |
## Domain allowed access.
|
|
Chris PeBenito |
885b83 |
## </summary>
|
|
Chris PeBenito |
414e41 |
## </param>
|
|
Chris PeBenito |
296273 |
## <rolecap/>
|
|
Chris PeBenito |
763c44 |
#
|
|
Chris PeBenito |
296273 |
interface(`userdom_exec_user_home_content_files',`
|
|
Chris PeBenito |
296273 |
gen_require(`
|
|
Chris PeBenito |
296273 |
type user_home_dir_t, user_home_t;
|
|
Chris PeBenito |
296273 |
')
|
|
Chris PeBenito |
296273 |
|
|
Chris PeBenito |
296273 |
files_search_home($1)
|
|
Chris PeBenito |
296273 |
exec_files_pattern($1, { user_home_dir_t user_home_t }, user_home_t)
|
|
Chris PeBenito |
296273 |
|
|
Chris PeBenito |
296273 |
tunable_policy(`use_nfs_home_dirs',`
|
|
Chris PeBenito |
296273 |
fs_exec_nfs_files($1)
|
|
Chris PeBenito |
296273 |
')
|
|
Chris PeBenito |
296273 |
|
|
Chris PeBenito |
296273 |
tunable_policy(`use_samba_home_dirs',`
|
|
Chris PeBenito |
296273 |
fs_exec_cifs_files($1)
|
|
Chris PeBenito |
296273 |
')
|
|
Chris PeBenito |
763c44 |
')
|
|
Chris PeBenito |
763c44 |
|
|
Chris PeBenito |
763c44 |
########################################
|
|
Chris PeBenito |
ab940a |
## <summary>
|
|
Chris PeBenito |
296273 |
## Do not audit attempts to execute user home files.
|
|
Chris PeBenito |
fd89e1 |
## </summary>
|
|
Chris PeBenito |
fd89e1 |
## <param name="domain">
|
|
Chris PeBenito |
885b83 |
## <summary>
|
|
Chris PeBenito |
725926 |
## Domain allowed access.
|
|
Chris PeBenito |
885b83 |
## </summary>
|
|
Chris PeBenito |
fd89e1 |
## </param>
|
|
Chris PeBenito |
fd89e1 |
#
|
|
Chris PeBenito |
296273 |
interface(`userdom_dontaudit_exec_user_home_content_files',`
|
|
Chris PeBenito |
296273 |
gen_require(`
|
|
Chris PeBenito |
296273 |
type user_home_t;
|
|
Chris PeBenito |
296273 |
')
|
|
Chris PeBenito |
296273 |
|
|
Chris PeBenito |
296273 |
dontaudit $1 user_home_t:file execute;
|
|
Chris PeBenito |
fd89e1 |
')
|
|
Chris PeBenito |
fd89e1 |
|
|
Chris PeBenito |
fd89e1 |
########################################
|
|
Chris PeBenito |
fd89e1 |
## <summary>
|
|
Chris PeBenito |
296273 |
## Create, read, write, and delete files
|
|
Chris PeBenito |
296273 |
## in a user home subdirectory.
|
|
Chris PeBenito |
fd89e1 |
## </summary>
|
|
Chris PeBenito |
fd89e1 |
## <param name="domain">
|
|
Chris PeBenito |
885b83 |
## <summary>
|
|
Chris PeBenito |
725926 |
## Domain allowed access.
|
|
Chris PeBenito |
885b83 |
## </summary>
|
|
Chris PeBenito |
fd89e1 |
## </param>
|
|
Chris PeBenito |
fd89e1 |
#
|
|
Chris PeBenito |
296273 |
interface(`userdom_manage_user_home_content_files',`
|
|
Chris PeBenito |
296273 |
gen_require(`
|
|
Chris PeBenito |
296273 |
type user_home_dir_t, user_home_t;
|
|
Chris PeBenito |
296273 |
')
|
|
Chris PeBenito |
296273 |
|
|
Chris PeBenito |
296273 |
manage_files_pattern($1, user_home_t, user_home_t)
|
|
Chris PeBenito |
296273 |
allow $1 user_home_dir_t:dir search_dir_perms;
|
|
Chris PeBenito |
296273 |
files_search_home($1)
|
|
Chris PeBenito |
fd89e1 |
')
|
|
Chris PeBenito |
fd89e1 |
|
|
Chris PeBenito |
fd89e1 |
########################################
|
|
Chris PeBenito |
fd89e1 |
## <summary>
|
|
Chris PeBenito |
296273 |
## Do not audit attempts to create, read, write, and delete directories
|
|
Chris PeBenito |
296273 |
## in a user home subdirectory.
|
|
Chris PeBenito |
799a0b |
## </summary>
|
|
Chris PeBenito |
799a0b |
## <param name="domain">
|
|
Chris PeBenito |
885b83 |
## <summary>
|
|
Chris PeBenito |
44fc06 |
## Domain allowed access.
|
|
Chris PeBenito |
885b83 |
## </summary>
|
|
Chris PeBenito |
799a0b |
## </param>
|
|
Chris PeBenito |
799a0b |
#
|
|
Chris PeBenito |
296273 |
interface(`userdom_dontaudit_manage_user_home_content_dirs',`
|
|
Chris PeBenito |
296273 |
gen_require(`
|
|
Chris PeBenito |
296273 |
type user_home_dir_t, user_home_t;
|
|
Chris PeBenito |
296273 |
')
|
|
Chris PeBenito |
296273 |
|
|
Chris PeBenito |
296273 |
dontaudit $1 user_home_t:dir manage_dir_perms;
|
|
Chris PeBenito |
799a0b |
')
|
|
Chris PeBenito |
799a0b |
|
|
Chris PeBenito |
799a0b |
########################################
|
|
Chris PeBenito |
799a0b |
## <summary>
|
|
Chris PeBenito |
296273 |
## Create, read, write, and delete symbolic links
|
|
Chris PeBenito |
296273 |
## in a user home subdirectory.
|
|
Chris PeBenito |
44fc06 |
## </summary>
|
|
Chris PeBenito |
44fc06 |
## <param name="domain">
|
|
Chris PeBenito |
885b83 |
## <summary>
|
|
Chris PeBenito |
296273 |
## Domain allowed access.
|
|
Chris PeBenito |
885b83 |
## </summary>
|
|
Chris PeBenito |
44fc06 |
## </param>
|
|
Chris PeBenito |
44fc06 |
#
|
|
Chris PeBenito |
296273 |
interface(`userdom_manage_user_home_content_symlinks',`
|
|
Chris PeBenito |
296273 |
gen_require(`
|
|
Chris PeBenito |
296273 |
type user_home_dir_t, user_home_t;
|
|
Chris PeBenito |
296273 |
')
|
|
Chris PeBenito |
296273 |
|
|
Chris PeBenito |
296273 |
manage_lnk_files_pattern($1, user_home_t, user_home_t)
|
|
Chris PeBenito |
296273 |
allow $1 user_home_dir_t:dir search_dir_perms;
|
|
Chris PeBenito |
296273 |
files_search_home($1)
|
|
Chris PeBenito |
44fc06 |
')
|
|
Chris PeBenito |
44fc06 |
|
|
Chris PeBenito |
44fc06 |
########################################
|
|
Chris PeBenito |
44fc06 |
## <summary>
|
|
Chris PeBenito |
296273 |
## Create, read, write, and delete named pipes
|
|
Chris PeBenito |
296273 |
## in a user home subdirectory.
|
|
Chris PeBenito |
ae9e27 |
## </summary>
|
|
Chris PeBenito |
ae9e27 |
## <param name="domain">
|
|
Chris PeBenito |
885b83 |
## <summary>
|
|
Chris PeBenito |
296273 |
## Domain allowed access.
|
|
Chris PeBenito |
885b83 |
## </summary>
|
|
Chris PeBenito |
ae9e27 |
## </param>
|
|
Chris PeBenito |
ae9e27 |
#
|
|
Chris PeBenito |
296273 |
interface(`userdom_manage_user_home_content_pipes',`
|
|
Chris PeBenito |
296273 |
gen_require(`
|
|
Chris PeBenito |
296273 |
type user_home_dir_t, user_home_t;
|
|
Chris PeBenito |
296273 |
')
|
|
Chris PeBenito |
296273 |
|
|
Chris PeBenito |
296273 |
manage_fifo_files_pattern($1, user_home_t, user_home_t)
|
|
Chris PeBenito |
296273 |
allow $1 user_home_dir_t:dir search_dir_perms;
|
|
Chris PeBenito |
296273 |
files_search_home($1)
|
|
Chris PeBenito |
ae9e27 |
')
|
|
Chris PeBenito |
ae9e27 |
|
|
Chris PeBenito |
ae9e27 |
########################################
|
|
Chris PeBenito |
ae9e27 |
## <summary>
|
|
Chris PeBenito |
296273 |
## Create, read, write, and delete named sockets
|
|
Chris PeBenito |
296273 |
## in a user home subdirectory.
|
|
Chris PeBenito |
ae9e27 |
## </summary>
|
|
Chris PeBenito |
ae9e27 |
## <param name="domain">
|
|
Chris PeBenito |
885b83 |
## <summary>
|
|
Chris PeBenito |
296273 |
## Domain allowed access.
|
|
Chris PeBenito |
885b83 |
## </summary>
|
|
Chris PeBenito |
ae9e27 |
## </param>
|
|
Chris PeBenito |
ae9e27 |
#
|
|
Chris PeBenito |
296273 |
interface(`userdom_manage_user_home_content_sockets',`
|
|
Chris PeBenito |
296273 |
gen_require(`
|
|
Chris PeBenito |
296273 |
type user_home_dir_t, user_home_t;
|
|
Chris PeBenito |
296273 |
')
|
|
Chris PeBenito |
296273 |
|
|
Chris PeBenito |
296273 |
allow $1 user_home_dir_t:dir search_dir_perms;
|
|
Chris PeBenito |
296273 |
manage_sock_files_pattern($1, user_home_t, user_home_t)
|
|
Chris PeBenito |
296273 |
files_search_home($1)
|
|
Chris PeBenito |
ae9e27 |
')
|
|
Chris PeBenito |
ae9e27 |
|
|
Chris PeBenito |
ae9e27 |
########################################
|
|
Chris PeBenito |
ae9e27 |
## <summary>
|
|
Chris PeBenito |
296273 |
## Create objects in a user home directory
|
|
Chris PeBenito |
296273 |
## with an automatic type transition to
|
|
Chris PeBenito |
296273 |
## a specified private type.
|
|
Chris PeBenito |
725926 |
## </summary>
|
|
Chris PeBenito |
725926 |
## <param name="domain">
|
|
Chris PeBenito |
885b83 |
## <summary>
|
|
Chris PeBenito |
725926 |
## Domain allowed access.
|
|
Chris PeBenito |
885b83 |
## </summary>
|
|
Chris PeBenito |
725926 |
## </param>
|
|
Chris PeBenito |
296273 |
## <param name="private_type">
|
|
Chris PeBenito |
885b83 |
## <summary>
|
|
Chris PeBenito |
296273 |
## The type of the object to create.
|
|
Chris PeBenito |
885b83 |
## </summary>
|
|
Chris PeBenito |
b11a75 |
## </param>
|
|
Chris PeBenito |
296273 |
## <param name="object_class">
|
|
Chris PeBenito |
885b83 |
## <summary>
|
|
Chris PeBenito |
296273 |
## The class of the object to be created.
|
|
Chris PeBenito |
885b83 |
## </summary>
|
|
Chris PeBenito |
e1c414 |
## </param>
|
|
Chris PeBenito |
e1c414 |
#
|
|
Chris PeBenito |
296273 |
interface(`userdom_user_home_dir_filetrans',`
|
|
Chris PeBenito |
296273 |
gen_require(`
|
|
Chris PeBenito |
296273 |
type user_home_dir_t;
|
|
Chris PeBenito |
296273 |
')
|
|
Chris PeBenito |
296273 |
|
|
Chris PeBenito |
296273 |
filetrans_pattern($1, user_home_dir_t, $2, $3)
|
|
Chris PeBenito |
296273 |
files_search_home($1)
|
|
Chris PeBenito |
e1c414 |
')
|
|
Chris PeBenito |
e1c414 |
|
|
Chris PeBenito |
e1c414 |
########################################
|
|
Chris PeBenito |
e1c414 |
## <summary>
|
|
Chris PeBenito |
296273 |
## Create objects in a user home directory
|
|
Chris PeBenito |
296273 |
## with an automatic type transition to
|
|
Chris PeBenito |
296273 |
## a specified private type.
|
|
Chris PeBenito |
10b1f3 |
## </summary>
|
|
Chris PeBenito |
10b1f3 |
## <param name="domain">
|
|
Chris PeBenito |
885b83 |
## <summary>
|
|
Chris PeBenito |
10b1f3 |
## Domain allowed access.
|
|
Chris PeBenito |
885b83 |
## </summary>
|
|
Chris PeBenito |
10b1f3 |
## </param>
|
|
Chris PeBenito |
296273 |
## <param name="private_type">
|
|
Chris PeBenito |
885b83 |
## <summary>
|
|
Chris PeBenito |
296273 |
## The type of the object to create.
|
|
Chris PeBenito |
885b83 |
## </summary>
|
|
Chris PeBenito |
ee9500 |
## </param>
|
|
Chris PeBenito |
ee9500 |
## <param name="object_class">
|
|
Chris PeBenito |
885b83 |
## <summary>
|
|
Chris PeBenito |
10b1f3 |
## The class of the object to be created.
|
|
Chris PeBenito |
885b83 |
## </summary>
|
|
Chris PeBenito |
10b1f3 |
## </param>
|
|
Chris PeBenito |
10b1f3 |
#
|
|
Chris PeBenito |
296273 |
interface(`userdom_user_home_content_filetrans',`
|
|
Chris PeBenito |
296273 |
gen_require(`
|
|
Chris PeBenito |
296273 |
type user_home_dir_t, user_home_t;
|
|
Chris PeBenito |
296273 |
')
|
|
Chris PeBenito |
296273 |
|
|
Chris PeBenito |
296273 |
filetrans_pattern($1, user_home_t, $2, $3)
|
|
Chris PeBenito |
296273 |
allow $1 user_home_dir_t:dir search_dir_perms;
|
|
Chris PeBenito |
296273 |
files_search_home($1)
|
|
Chris PeBenito |
10b1f3 |
')
|
|
Chris PeBenito |
10b1f3 |
|
|
Chris PeBenito |
10b1f3 |
########################################
|
|
Chris PeBenito |
10b1f3 |
## <summary>
|
|
Chris PeBenito |
296273 |
## Create objects in a user home directory
|
|
Chris PeBenito |
296273 |
## with an automatic type transition to
|
|
Chris PeBenito |
296273 |
## the user home file type.
|
|
Chris PeBenito |
10b1f3 |
## </summary>
|
|
Chris PeBenito |
10b1f3 |
## <param name="domain">
|
|
Chris PeBenito |
885b83 |
## <summary>
|
|
Chris PeBenito |
296273 |
## Domain allowed access.
|
|
Chris PeBenito |
296273 |
## </summary>
|
|
Chris PeBenito |
296273 |
## </param>
|
|
Chris PeBenito |
296273 |
## <param name="object_class">
|
|
Chris PeBenito |
296273 |
## <summary>
|
|
Chris PeBenito |
296273 |
## The class of the object to be created.
|
|
Chris PeBenito |
885b83 |
## </summary>
|
|
Chris PeBenito |
10b1f3 |
## </param>
|
|
Chris PeBenito |
10b1f3 |
#
|
|
Chris PeBenito |
296273 |
interface(`userdom_user_home_dir_filetrans_user_home_content',`
|
|
Chris PeBenito |
296273 |
gen_require(`
|
|
Chris PeBenito |
296273 |
type user_home_dir_t, user_home_t;
|
|
Chris PeBenito |
296273 |
')
|
|
Chris PeBenito |
296273 |
|
|
Chris PeBenito |
296273 |
filetrans_pattern($1, user_home_dir_t, user_home_t, $2)
|
|
Chris PeBenito |
296273 |
files_search_home($1)
|
|
Chris PeBenito |
10b1f3 |
')
|
|
Chris PeBenito |
10b1f3 |
|
|
Chris PeBenito |
10b1f3 |
########################################
|
|
Chris PeBenito |
10b1f3 |
## <summary>
|
|
Chris PeBenito |
296273 |
## Write to user temporary named sockets.
|
|
Chris PeBenito |
fd89e1 |
## </summary>
|
|
Chris PeBenito |
fd89e1 |
## <param name="domain">
|
|
Chris PeBenito |
885b83 |
## <summary>
|
|
Chris PeBenito |
296273 |
## Domain allowed access.
|
|
Chris PeBenito |
885b83 |
## </summary>
|
|
Chris PeBenito |
fd89e1 |
## </param>
|
|
Chris PeBenito |
fd89e1 |
#
|
|
Chris PeBenito |
296273 |
interface(`userdom_write_user_tmp_sockets',`
|
|
Chris PeBenito |
296273 |
gen_require(`
|
|
Chris PeBenito |
296273 |
type user_tmp_t;
|
|
Chris PeBenito |
296273 |
')
|
|
Chris PeBenito |
296273 |
|
|
Chris PeBenito |
296273 |
allow $1 user_tmp_t:sock_file write;
|
|
Chris PeBenito |
296273 |
files_search_tmp($1)
|
|
Chris PeBenito |
ed38ca |
')
|
|
Chris PeBenito |
fd89e1 |
|
|
Chris PeBenito |
ed38ca |
########################################
|
|
Chris PeBenito |
ed38ca |
## <summary>
|
|
Chris PeBenito |
296273 |
## List user temporary directories.
|
|
Chris PeBenito |
ed38ca |
## </summary>
|
|
Chris PeBenito |
ed38ca |
## <param name="domain">
|
|
Chris PeBenito |
ed38ca |
## <summary>
|
|
Chris PeBenito |
ed38ca |
## Domain allowed access.
|
|
Chris PeBenito |
ed38ca |
## </summary>
|
|
Chris PeBenito |
ed38ca |
## </param>
|
|
Chris PeBenito |
ed38ca |
#
|
|
Chris PeBenito |
296273 |
interface(`userdom_list_user_tmp',`
|
|
Chris PeBenito |
296273 |
gen_require(`
|
|
Chris PeBenito |
296273 |
type user_tmp_t;
|
|
Chris PeBenito |
296273 |
')
|
|
Chris PeBenito |
296273 |
|
|
Chris PeBenito |
296273 |
allow $1 user_tmp_t:dir list_dir_perms;
|
|
Chris PeBenito |
296273 |
files_search_tmp($1)
|
|
Chris PeBenito |
fd89e1 |
')
|
|
Chris PeBenito |
fd89e1 |
|
|
Chris PeBenito |
fd89e1 |
########################################
|
|
Chris PeBenito |
fd89e1 |
## <summary>
|
|
Chris PeBenito |
296273 |
## Do not audit attempts to list user
|
|
Chris PeBenito |
296273 |
## temporary directories.
|
|
Chris PeBenito |
178647 |
## </summary>
|
|
Chris PeBenito |
178647 |
## <param name="domain">
|
|
Chris PeBenito |
178647 |
## <summary>
|
|
Chris PeBenito |
296273 |
## Domain to not audit.
|
|
Chris PeBenito |
178647 |
## </summary>
|
|
Chris PeBenito |
178647 |
## </param>
|
|
Chris PeBenito |
178647 |
#
|
|
Chris PeBenito |
296273 |
interface(`userdom_dontaudit_list_user_tmp',`
|
|
Chris PeBenito |
178647 |
gen_require(`
|
|
Chris PeBenito |
296273 |
type user_tmp_t;
|
|
Chris PeBenito |
178647 |
')
|
|
Chris PeBenito |
178647 |
|
|
Chris PeBenito |
296273 |
dontaudit $1 user_tmp_t:dir list_dir_perms;
|
|
Chris PeBenito |
178647 |
')
|
|
Chris PeBenito |
178647 |
|
|
Chris PeBenito |
178647 |
########################################
|
|
Chris PeBenito |
178647 |
## <summary>
|
|
Chris PeBenito |
296273 |
## Do not audit attempts to manage users
|
|
Chris PeBenito |
296273 |
## temporary directories.
|
|
Chris PeBenito |
977840 |
## </summary>
|
|
Chris PeBenito |
977840 |
## <param name="domain">
|
|
Chris PeBenito |
885b83 |
## <summary>
|
|
Chris PeBenito |
296273 |
## Domain to not audit.
|
|
Chris PeBenito |
885b83 |
## </summary>
|
|
Chris PeBenito |
977840 |
## </param>
|
|
Chris PeBenito |
977840 |
#
|
|
Chris PeBenito |
296273 |
interface(`userdom_dontaudit_manage_user_tmp_dirs',`
|
|
Chris PeBenito |
977840 |
gen_require(`
|
|
Chris PeBenito |
296273 |
type user_tmp_t;
|
|
Chris PeBenito |
977840 |
')
|
|
Chris PeBenito |
977840 |
|
|
Chris PeBenito |
296273 |
dontaudit $1 user_tmp_t:dir manage_dir_perms;
|
|
Chris PeBenito |
977840 |
')
|
|
Chris PeBenito |
977840 |
|
|
Chris PeBenito |
977840 |
########################################
|
|
Chris PeBenito |
977840 |
## <summary>
|
|
Chris PeBenito |
296273 |
## Read user temporary files.
|
|
Chris PeBenito |
ab940a |
## </summary>
|
|
Chris PeBenito |
414e41 |
## <param name="domain">
|
|
Chris PeBenito |
885b83 |
## <summary>
|
|
Chris PeBenito |
725926 |
## Domain allowed access.
|
|
Chris PeBenito |
885b83 |
## </summary>
|
|
Chris PeBenito |
414e41 |
## </param>
|
|
Chris PeBenito |
4bf4ed |
#
|
|
Chris PeBenito |
296273 |
interface(`userdom_read_user_tmp_files',`
|
|
Chris PeBenito |
0404a3 |
gen_require(`
|
|
Chris PeBenito |
296273 |
type user_tmp_t;
|
|
Chris PeBenito |
0404a3 |
')
|
|
Chris PeBenito |
0c73cd |
|
|
Chris PeBenito |
296273 |
read_files_pattern($1, user_tmp_t, user_tmp_t)
|
|
Chris PeBenito |
296273 |
allow $1 user_tmp_t:dir list_dir_perms;
|
|
Chris PeBenito |
296273 |
files_search_tmp($1)
|
|
Chris PeBenito |
4bf4ed |
')
|
|
Chris PeBenito |
4bf4ed |
|
|
Chris PeBenito |
4bf4ed |
########################################
|
|
Chris PeBenito |
ab940a |
## <summary>
|
|
Chris PeBenito |
296273 |
## Do not audit attempts to read users
|
|
Chris PeBenito |
296273 |
## temporary files.
|
|
Chris PeBenito |
ae9e27 |
## </summary>
|
|
Chris PeBenito |
ae9e27 |
## <param name="domain">
|
|
Chris PeBenito |
885b83 |
## <summary>
|
|
Chris PeBenito |
ae9e27 |
## Domain to not audit.
|
|
Chris PeBenito |
885b83 |
## </summary>
|
|
Chris PeBenito |
ae9e27 |
## </param>
|
|
Chris PeBenito |
ae9e27 |
#
|
|
Chris PeBenito |
296273 |
interface(`userdom_dontaudit_read_user_tmp_files',`
|
|
Chris PeBenito |
ae9e27 |
gen_require(`
|
|
Chris PeBenito |
296273 |
type user_tmp_t;
|
|
Chris PeBenito |
ae9e27 |
')
|
|
Chris PeBenito |
ae9e27 |
|
|
Chris PeBenito |
296273 |
dontaudit $1 user_tmp_t:file read_file_perms;
|
|
Chris PeBenito |
ae9e27 |
')
|
|
Chris PeBenito |
ae9e27 |
|
|
Chris PeBenito |
ae9e27 |
########################################
|
|
Chris PeBenito |
ae9e27 |
## <summary>
|
|
Chris PeBenito |
296273 |
## Do not audit attempts to append users
|
|
Chris PeBenito |
296273 |
## temporary files.
|
|
Chris PeBenito |
ab940a |
## </summary>
|
|
Chris PeBenito |
414e41 |
## <param name="domain">
|
|
Chris PeBenito |
885b83 |
## <summary>
|
|
Chris PeBenito |
296273 |
## Domain to not audit.
|
|
Chris PeBenito |
885b83 |
## </summary>
|
|
Chris PeBenito |
414e41 |
## </param>
|
|
Chris PeBenito |
daa0e0 |
#
|
|
Chris PeBenito |
296273 |
interface(`userdom_dontaudit_append_user_tmp_files',`
|
|
Chris PeBenito |
0404a3 |
gen_require(`
|
|
Chris PeBenito |
296273 |
type user_tmp_t;
|
|
Chris PeBenito |
0404a3 |
')
|
|
Chris PeBenito |
0c73cd |
|
|
Chris PeBenito |
296273 |
dontaudit $1 user_tmp_t:file append;
|
|
Chris PeBenito |
daa0e0 |
')
|
|
Chris PeBenito |
daa0e0 |
|
|
Chris PeBenito |
daa0e0 |
########################################
|
|
Chris PeBenito |
ab940a |
## <summary>
|
|
Chris PeBenito |
296273 |
## Read and write user temporary files.
|
|
Chris PeBenito |
fc6524 |
## </summary>
|
|
Chris PeBenito |
fc6524 |
## <param name="domain">
|
|
Chris PeBenito |
885b83 |
## <summary>
|
|
Chris PeBenito |
725926 |
## Domain allowed access.
|
|
Chris PeBenito |
885b83 |
## </summary>
|
|
Chris PeBenito |
fc6524 |
## </param>
|
|
Chris PeBenito |
fc6524 |
#
|
|
Chris PeBenito |
296273 |
interface(`userdom_rw_user_tmp_files',`
|
|
Chris PeBenito |
fc6524 |
gen_require(`
|
|
Chris PeBenito |
296273 |
type user_tmp_t;
|
|
Chris PeBenito |
fc6524 |
')
|
|
Chris PeBenito |
fc6524 |
|
|
Chris PeBenito |
296273 |
allow $1 user_tmp_t:dir list_dir_perms;
|
|
Chris PeBenito |
296273 |
rw_files_pattern($1, user_tmp_t, user_tmp_t)
|
|
Chris PeBenito |
296273 |
files_search_tmp($1)
|
|
Chris PeBenito |
fc6524 |
')
|
|
Chris PeBenito |
fc6524 |
|
|
Chris PeBenito |
fc6524 |
########################################
|
|
Chris PeBenito |
fc6524 |
## <summary>
|
|
Chris PeBenito |
296273 |
## Do not audit attempts to manage users
|
|
Chris PeBenito |
296273 |
## temporary files.
|
|
Chris PeBenito |
fc6524 |
## </summary>
|
|
Chris PeBenito |
fc6524 |
## <param name="domain">
|
|
Chris PeBenito |
885b83 |
## <summary>
|
|
Chris PeBenito |
296273 |
## Domain to not audit.
|
|
Chris PeBenito |
885b83 |
## </summary>
|
|
Chris PeBenito |
fc6524 |
## </param>
|
|
Chris PeBenito |
fc6524 |
#
|
|
Chris PeBenito |
296273 |
interface(`userdom_dontaudit_manage_user_tmp_files',`
|
|
Chris PeBenito |
fc6524 |
gen_require(`
|
|
Chris PeBenito |
296273 |
type user_tmp_t;
|
|
Chris PeBenito |
fc6524 |
')
|
|
Chris PeBenito |
fc6524 |
|
|
Chris PeBenito |
296273 |
dontaudit $1 user_tmp_t:file manage_file_perms;
|
|
Chris PeBenito |
fc6524 |
')
|
|
Chris PeBenito |
fc6524 |
|
|
Chris PeBenito |
fc6524 |
########################################
|
|
Chris PeBenito |
fc6524 |
## <summary>
|
|
Chris PeBenito |
296273 |
## Read user temporary symbolic links.
|
|
Chris PeBenito |
fc6524 |
## </summary>
|
|
Chris PeBenito |
fc6524 |
## <param name="domain">
|
|
Chris PeBenito |
885b83 |
## <summary>
|
|
Chris PeBenito |
725926 |
## Domain allowed access.
|
|
Chris PeBenito |
885b83 |
## </summary>
|
|
Chris PeBenito |
fc6524 |
## </param>
|
|
Chris PeBenito |
fc6524 |
#
|
|
Chris PeBenito |
296273 |
interface(`userdom_read_user_tmp_symlinks',`
|
|
Chris PeBenito |
fc6524 |
gen_require(`
|
|
Chris PeBenito |
296273 |
type user_tmp_t;
|
|
Chris PeBenito |
fc6524 |
')
|
|
Chris PeBenito |
fc6524 |
|
|
Chris PeBenito |
296273 |
read_lnk_files_pattern($1, user_tmp_t, user_tmp_t)
|
|
Chris PeBenito |
296273 |
allow $1 user_tmp_t:dir list_dir_perms;
|
|
Chris PeBenito |
296273 |
files_search_tmp($1)
|
|
Chris PeBenito |
fc6524 |
')
|
|
Chris PeBenito |
fc6524 |
|
|
Chris PeBenito |
fc6524 |
########################################
|
|
Chris PeBenito |
fc6524 |
## <summary>
|
|
Chris PeBenito |
296273 |
## Create, read, write, and delete user
|
|
Chris PeBenito |
296273 |
## temporary directories.
|
|
Chris PeBenito |
784a3b |
## </summary>
|
|
Chris PeBenito |
784a3b |
## <param name="domain">
|
|
Chris PeBenito |
885b83 |
## <summary>
|
|
Chris PeBenito |
725926 |
## Domain allowed access.
|
|
Chris PeBenito |
885b83 |
## </summary>
|
|
Chris PeBenito |
784a3b |
## </param>
|
|
Chris PeBenito |
784a3b |
#
|
|
Chris PeBenito |
296273 |
interface(`userdom_manage_user_tmp_dirs',`
|
|
Chris PeBenito |
784a3b |
gen_require(`
|
|
Chris PeBenito |
296273 |
type user_tmp_t;
|
|
Chris PeBenito |
784a3b |
')
|
|
Chris PeBenito |
784a3b |
|
|
Chris PeBenito |
296273 |
manage_dirs_pattern($1, user_tmp_t, user_tmp_t)
|
|
Chris PeBenito |
296273 |
files_search_tmp($1)
|
|
Chris PeBenito |
784a3b |
')
|
|
Chris PeBenito |
784a3b |
|
|
Chris PeBenito |
784a3b |
########################################
|
|
Chris PeBenito |
784a3b |
## <summary>
|
|
Chris PeBenito |
296273 |
## Create, read, write, and delete user
|
|
Chris PeBenito |
296273 |
## temporary files.
|
|
Chris PeBenito |
ab940a |
## </summary>
|
|
Chris PeBenito |
ab940a |
## <param name="domain">
|
|
Chris PeBenito |
885b83 |
## <summary>
|
|
Chris PeBenito |
725926 |
## Domain allowed access.
|
|
Chris PeBenito |
885b83 |
## </summary>
|
|
Chris PeBenito |
ab940a |
## </param>
|
|
Chris PeBenito |
ab940a |
#
|
|
Chris PeBenito |
296273 |
interface(`userdom_manage_user_tmp_files',`
|
|
Chris PeBenito |
ab940a |
gen_require(`
|
|
Chris PeBenito |
296273 |
type user_tmp_t;
|
|
Chris PeBenito |
ab940a |
')
|
|
Chris PeBenito |
ab940a |
|
|
Chris PeBenito |
296273 |
manage_files_pattern($1, user_tmp_t, user_tmp_t)
|
|
Chris PeBenito |
296273 |
files_search_tmp($1)
|
|
Chris PeBenito |
ab940a |
')
|
|
Chris PeBenito |
ab940a |
|
|
Chris PeBenito |
ab940a |
########################################
|
|
Chris PeBenito |
ab940a |
## <summary>
|
|
Chris PeBenito |
296273 |
## Create, read, write, and delete user
|
|
Chris PeBenito |
296273 |
## temporary symbolic links.
|
|
Chris PeBenito |
ab940a |
## </summary>
|
|
Chris PeBenito |
414e41 |
## <param name="domain">
|
|
Chris PeBenito |
885b83 |
## <summary>
|
|
Chris PeBenito |
725926 |
## Domain allowed access.
|
|
Chris PeBenito |
885b83 |
## </summary>
|
|
Chris PeBenito |
414e41 |
## </param>
|
|
Chris PeBenito |
490639 |
#
|
|
Chris PeBenito |
296273 |
interface(`userdom_manage_user_tmp_symlinks',`
|
|
Chris PeBenito |
0404a3 |
gen_require(`
|
|
Chris PeBenito |
296273 |
type user_tmp_t;
|
|
Chris PeBenito |
0404a3 |
')
|
|
Chris PeBenito |
0c73cd |
|
|
Chris PeBenito |
296273 |
manage_lnk_files_pattern($1, user_tmp_t, user_tmp_t)
|
|
Chris PeBenito |
296273 |
files_search_tmp($1)
|
|
Chris PeBenito |
490639 |
')
|
|
Chris PeBenito |
490639 |
|
|
Chris PeBenito |
daa0e0 |
########################################
|
|
Chris PeBenito |
ab940a |
## <summary>
|
|
Chris PeBenito |
296273 |
## Create, read, write, and delete user
|
|
Chris PeBenito |
296273 |
## temporary named pipes.
|
|
Chris PeBenito |
ab940a |
## </summary>
|
|
Chris PeBenito |
414e41 |
## <param name="domain">
|
|
Chris PeBenito |
885b83 |
## <summary>
|
|
Chris PeBenito |
725926 |
## Domain allowed access.
|
|
Chris PeBenito |
885b83 |
## </summary>
|
|
Chris PeBenito |
414e41 |
## </param>
|
|
Chris PeBenito |
4bf4ed |
#
|
|
Chris PeBenito |
296273 |
interface(`userdom_manage_user_tmp_pipes',`
|
|
Chris PeBenito |
0404a3 |
gen_require(`
|
|
Chris PeBenito |
296273 |
type user_tmp_t;
|
|
Chris PeBenito |
0404a3 |
')
|
|
Chris PeBenito |
0c73cd |
|
|
Chris PeBenito |
296273 |
manage_fifo_files_pattern($1, user_tmp_t, user_tmp_t)
|
|
Chris PeBenito |
296273 |
files_search_tmp($1)
|
|
Chris PeBenito |
4bf4ed |
')
|
|
Chris PeBenito |
4bf4ed |
|
|
Chris PeBenito |
0404a3 |
########################################
|
|
Chris PeBenito |
ab940a |
## <summary>
|
|
Chris PeBenito |
296273 |
## Create, read, write, and delete user
|
|
Chris PeBenito |
296273 |
## temporary named sockets.
|
|
Chris PeBenito |
ab940a |
## </summary>
|
|
Chris PeBenito |
414e41 |
## <param name="domain">
|
|
Chris PeBenito |
885b83 |
## <summary>
|
|
Chris PeBenito |
57a96c |
## Domain allowed access.
|
|
Chris PeBenito |
885b83 |
## </summary>
|
|
Chris PeBenito |
414e41 |
## </param>
|
|
Chris PeBenito |
0404a3 |
#
|
|
Chris PeBenito |
296273 |
interface(`userdom_manage_user_tmp_sockets',`
|
|
Chris PeBenito |
296273 |
gen_require(`
|
|
Chris PeBenito |
296273 |
type user_tmp_t;
|
|
Chris PeBenito |
296273 |
')
|
|
Chris PeBenito |
296273 |
|
|
Chris PeBenito |
296273 |
manage_sock_files_pattern($1, user_tmp_t, user_tmp_t)
|
|
Chris PeBenito |
296273 |
files_search_tmp($1)
|
|
Chris PeBenito |
4bf4ed |
')
|
|
Chris PeBenito |
4bf4ed |
|
|
Chris PeBenito |
4bf4ed |
########################################
|
|
Chris PeBenito |
ab940a |
## <summary>
|
|
Chris PeBenito |
296273 |
## Create objects in a user temporary directory
|
|
Chris PeBenito |
296273 |
## with an automatic type transition to
|
|
Chris PeBenito |
296273 |
## a specified private type.
|
|
Chris PeBenito |
4614e8 |
## </summary>
|
|
Chris PeBenito |
4614e8 |
## <param name="domain">
|
|
Chris PeBenito |
885b83 |
## <summary>
|
|
Chris PeBenito |
4614e8 |
## Domain allowed access.
|
|
Chris PeBenito |
885b83 |
## </summary>
|
|
Chris PeBenito |
4614e8 |
## </param>
|
|
Chris PeBenito |
296273 |
## <param name="private_type">
|
|
Chris PeBenito |
296273 |
## <summary>
|
|
Chris PeBenito |
296273 |
## The type of the object to create.
|
|
Chris PeBenito |
296273 |
## </summary>
|
|
Chris PeBenito |
296273 |
## </param>
|
|
Chris PeBenito |
296273 |
## <param name="object_class">
|
|
Chris PeBenito |
296273 |
## <summary>
|
|
Chris PeBenito |
296273 |
## The class of the object to be created.
|
|
Chris PeBenito |
296273 |
## </summary>
|
|
Chris PeBenito |
296273 |
## </param>
|
|
Chris PeBenito |
4614e8 |
#
|
|
Chris PeBenito |
296273 |
interface(`userdom_user_tmp_filetrans',`
|
|
Chris PeBenito |
296273 |
gen_require(`
|
|
Chris PeBenito |
296273 |
type user_tmp_t;
|
|
Chris PeBenito |
296273 |
')
|
|
Chris PeBenito |
296273 |
|
|
Chris PeBenito |
296273 |
filetrans_pattern($1, user_tmp_t, $2, $3)
|
|
Chris PeBenito |
296273 |
files_search_tmp($1)
|
|
Chris PeBenito |
4614e8 |
')
|
|
Chris PeBenito |
4614e8 |
|
|
Chris PeBenito |
daa0e0 |
########################################
|
|
Chris PeBenito |
ab940a |
## <summary>
|
|
Chris PeBenito |
296273 |
## Create objects in the temporary directory
|
|
Chris PeBenito |
296273 |
## with an automatic type transition to
|
|
Chris PeBenito |
296273 |
## the user temporary type.
|
|
Chris PeBenito |
57a96c |
## </summary>
|
|
Chris PeBenito |
57a96c |
## <param name="domain">
|
|
Chris PeBenito |
885b83 |
## <summary>
|
|
Chris PeBenito |
57a96c |
## Domain allowed access.
|
|
Chris PeBenito |
885b83 |
## </summary>
|
|
Chris PeBenito |
57a96c |
## </param>
|
|
Chris PeBenito |
1c1ac6 |
## <param name="object_class">
|
|
Chris PeBenito |
885b83 |
## <summary>
|
|
Chris PeBenito |
57a96c |
## The class of the object to be created.
|
|
Chris PeBenito |
885b83 |
## </summary>
|
|
Chris PeBenito |
57a96c |
## </param>
|
|
Chris PeBenito |
57a96c |
#
|
|
Chris PeBenito |
296273 |
interface(`userdom_tmp_filetrans_user_tmp',`
|
|
Chris PeBenito |
296273 |
gen_require(`
|
|
Chris PeBenito |
296273 |
type user_tmp_t;
|
|
Chris PeBenito |
296273 |
')
|
|
Chris PeBenito |
296273 |
|
|
Chris PeBenito |
296273 |
files_tmp_filetrans($1, user_tmp_t, $2)
|
|
Chris PeBenito |
57a96c |
')
|
|
Chris PeBenito |
57a96c |
|
|
Chris PeBenito |
57a96c |
########################################
|
|
Chris PeBenito |
57a96c |
## <summary>
|
|
Chris PeBenito |
296273 |
## Read user tmpfs files.
|
|
Chris PeBenito |
d4dca5 |
## </summary>
|
|
Chris PeBenito |
d4dca5 |
## <param name="domain">
|
|
Chris PeBenito |
885b83 |
## <summary>
|
|
Chris PeBenito |
d4dca5 |
## Domain allowed access.
|
|
Chris PeBenito |
885b83 |
## </summary>
|
|
Chris PeBenito |
d4dca5 |
## </param>
|
|
Chris PeBenito |
d4dca5 |
#
|
|
Chris PeBenito |
296273 |
interface(`userdom_rw_user_tmpfs_files',`
|
|
Chris PeBenito |
296273 |
gen_require(`
|
|
Chris PeBenito |
296273 |
type user_tmpfs_t;
|
|
Chris PeBenito |
296273 |
')
|
|
Chris PeBenito |
296273 |
|
|
Chris PeBenito |
296273 |
rw_files_pattern($1, user_tmpfs_t, user_tmpfs_t)
|
|
Chris PeBenito |
296273 |
read_lnk_files_pattern($1, user_tmpfs_t, user_tmpfs_t)
|
|
Chris PeBenito |
296273 |
allow $1 user_tmpfs_t:dir list_dir_perms;
|
|
Chris PeBenito |
296273 |
fs_search_tmpfs($1)
|
|
Chris PeBenito |
d4dca5 |
')
|
|
Chris PeBenito |
d4dca5 |
|
|
Chris PeBenito |
d4dca5 |
########################################
|
|
Chris PeBenito |
d4dca5 |
## <summary>
|
|
Chris PeBenito |
296273 |
## Get the attributes of a user domain tty.
|
|
Chris PeBenito |
d9845a |
## </summary>
|
|
Chris PeBenito |
d9845a |
## <param name="domain">
|
|
Chris PeBenito |
d9845a |
## <summary>
|
|
Chris PeBenito |
d9845a |
## Domain allowed access.
|
|
Chris PeBenito |
d9845a |
## </summary>
|
|
Chris PeBenito |
d9845a |
## </param>
|
|
Chris PeBenito |
d9845a |
#
|
|
Chris PeBenito |
296273 |
interface(`userdom_getattr_user_ttys',`
|
|
Chris PeBenito |
296273 |
gen_require(`
|
|
Chris PeBenito |
296273 |
type user_tty_device_t;
|
|
Chris PeBenito |
296273 |
')
|
|
Chris PeBenito |
296273 |
|
|
Chris PeBenito |
296273 |
allow $1 user_tty_device_t:chr_file getattr;
|
|
Chris PeBenito |
d9845a |
')
|
|
Chris PeBenito |
d9845a |
|
|
Chris PeBenito |
d9845a |
########################################
|
|
Chris PeBenito |
d9845a |
## <summary>
|
|
Chris PeBenito |
296273 |
## Do not audit attempts to get the attributes of a user domain tty.
|
|
Chris PeBenito |
57a96c |
## </summary>
|
|
Chris PeBenito |
57a96c |
## <param name="domain">
|
|
Chris PeBenito |
885b83 |
## <summary>
|
|
Chris PeBenito |
57a96c |
## Domain allowed access.
|
|
Chris PeBenito |
885b83 |
## </summary>
|
|
Chris PeBenito |
57a96c |
## </param>
|
|
Chris PeBenito |
57a96c |
#
|
|
Chris PeBenito |
296273 |
interface(`userdom_dontaudit_getattr_user_ttys',`
|
|
Chris PeBenito |
296273 |
gen_require(`
|
|
Chris PeBenito |
296273 |
type user_tty_device_t;
|
|
Chris PeBenito |
296273 |
')
|
|
Chris PeBenito |
296273 |
|
|
Chris PeBenito |
296273 |
dontaudit $1 user_tty_device_t:chr_file getattr;
|
|
Chris PeBenito |
57a96c |
')
|
|
Chris PeBenito |
57a96c |
|
|
Chris PeBenito |
57a96c |
########################################
|
|
Chris PeBenito |
57a96c |
## <summary>
|
|
Chris PeBenito |
296273 |
## Set the attributes of a user domain tty.
|
|
Chris PeBenito |
d6d16b |
## </summary>
|
|
Chris PeBenito |
d6d16b |
## <param name="domain">
|
|
Chris PeBenito |
d6d16b |
## <summary>
|
|
Chris PeBenito |
d6d16b |
## Domain allowed access.
|
|
Chris PeBenito |
d6d16b |
## </summary>
|
|
Chris PeBenito |
d6d16b |
## </param>
|
|
Chris PeBenito |
d6d16b |
#
|
|
Chris PeBenito |
296273 |
interface(`userdom_setattr_user_ttys',`
|
|
Chris PeBenito |
296273 |
gen_require(`
|
|
Chris PeBenito |
296273 |
type user_tty_device_t;
|
|
Chris PeBenito |
296273 |
')
|
|
Chris PeBenito |
296273 |
|
|
Chris PeBenito |
296273 |
allow $1 user_tty_device_t:chr_file setattr;
|
|
Chris PeBenito |
d6d16b |
')
|
|
Chris PeBenito |
d6d16b |
|
|
Chris PeBenito |
d6d16b |
########################################
|
|
Chris PeBenito |
d6d16b |
## <summary>
|
|
Chris PeBenito |
296273 |
## Do not audit attempts to set the attributes of a user domain tty.
|
|
Chris PeBenito |
165b42 |
## </summary>
|
|
Chris PeBenito |
165b42 |
## <param name="domain">
|
|
Chris PeBenito |
165b42 |
## <summary>
|
|
Chris PeBenito |
165b42 |
## Domain allowed access.
|
|
Chris PeBenito |
165b42 |
## </summary>
|
|
Chris PeBenito |
165b42 |
## </param>
|
|
Chris PeBenito |
165b42 |
#
|
|
Chris PeBenito |
296273 |
interface(`userdom_dontaudit_setattr_user_ttys',`
|
|
Chris PeBenito |
296273 |
gen_require(`
|
|
Chris PeBenito |
296273 |
type user_tty_device_t;
|
|
Chris PeBenito |
296273 |
')
|
|
Chris PeBenito |
296273 |
|
|
Chris PeBenito |
296273 |
dontaudit $1 user_tty_device_t:chr_file setattr;
|
|
Chris PeBenito |
165b42 |
')
|
|
Chris PeBenito |
165b42 |
|
|
Chris PeBenito |
165b42 |
########################################
|
|
Chris PeBenito |
165b42 |
## <summary>
|
|
Chris PeBenito |
296273 |
## Read and write a user domain tty.
|
|
Chris PeBenito |
d6d16b |
## </summary>
|
|
Chris PeBenito |
d6d16b |
## <param name="domain">
|
|
Chris PeBenito |
d6d16b |
## <summary>
|
|
Chris PeBenito |
d6d16b |
## Domain allowed access.
|
|
Chris PeBenito |
d6d16b |
## </summary>
|
|
Chris PeBenito |
d6d16b |
## </param>
|
|
Chris PeBenito |
d6d16b |
#
|
|
Chris PeBenito |
296273 |
interface(`userdom_use_user_ttys',`
|
|
Chris PeBenito |
296273 |
gen_require(`
|
|
Chris PeBenito |
296273 |
type user_tty_device_t;
|
|
Chris PeBenito |
296273 |
')
|
|
Chris PeBenito |
296273 |
|
|
Chris PeBenito |
296273 |
allow $1 user_tty_device_t:chr_file rw_term_perms;
|
|
Chris PeBenito |
d6d16b |
')
|
|
Chris PeBenito |
d6d16b |
|
|
Chris PeBenito |
d6d16b |
########################################
|
|
Chris PeBenito |
d6d16b |
## <summary>
|
|
Chris PeBenito |
296273 |
## Read and write a user domain pty.
|
|
Chris PeBenito |
57a96c |
## </summary>
|
|
Chris PeBenito |
57a96c |
## <param name="domain">
|
|
Chris PeBenito |
885b83 |
## <summary>
|
|
Chris PeBenito |
57a96c |
## Domain allowed access.
|
|
Chris PeBenito |
885b83 |
## </summary>
|
|
Chris PeBenito |
57a96c |
## </param>
|
|
Chris PeBenito |
57a96c |
#
|
|
Chris PeBenito |
296273 |
interface(`userdom_use_user_ptys',`
|
|
Chris PeBenito |
296273 |
gen_require(`
|
|
Chris PeBenito |
296273 |
type user_devpts_t;
|
|
Chris PeBenito |
296273 |
')
|
|
Chris PeBenito |
296273 |
|
|
Chris PeBenito |
296273 |
allow $1 user_devpts_t:chr_file rw_term_perms;
|
|
Chris PeBenito |
57a96c |
')
|
|
Chris PeBenito |
57a96c |
|
|
Chris PeBenito |
57a96c |
########################################
|
|
Chris PeBenito |
57a96c |
## <summary>
|
|
Chris PeBenito |
296273 |
## Read and write a user domain tty and pty.
|
|
Chris PeBenito |
d6d16b |
## </summary>
|
|
Chris PeBenito |
d6d16b |
## <param name="domain">
|
|
Chris PeBenito |
d6d16b |
## <summary>
|
|
Chris PeBenito |
d6d16b |
## Domain allowed access.
|
|
Chris PeBenito |
d6d16b |
## </summary>
|
|
Chris PeBenito |
d6d16b |
## </param>
|
|
Chris PeBenito |
d6d16b |
#
|
|
Chris PeBenito |
296273 |
interface(`userdom_use_user_terminals',`
|
|
Chris PeBenito |
296273 |
gen_require(`
|
|
Chris PeBenito |
296273 |
type user_tty_device_t, user_devpts_t;
|
|
Chris PeBenito |
296273 |
')
|
|
Chris PeBenito |
296273 |
|
|
Chris PeBenito |
296273 |
allow $1 user_tty_device_t:chr_file rw_term_perms;
|
|
Chris PeBenito |
296273 |
allow $1 user_devpts_t:chr_file rw_term_perms;
|
|
Chris PeBenito |
296273 |
term_list_ptys($1)
|
|
Chris PeBenito |
d6d16b |
')
|
|
Chris PeBenito |
d6d16b |
|
|
Chris PeBenito |
d6d16b |
########################################
|
|
Chris PeBenito |
d6d16b |
## <summary>
|
|
Chris PeBenito |
296273 |
## Do not audit attempts to read and write
|
|
Chris PeBenito |
296273 |
## a user domain tty and pty.
|
|
Chris PeBenito |
57a96c |
## </summary>
|
|
Chris PeBenito |
57a96c |
## <param name="domain">
|
|
Chris PeBenito |
885b83 |
## <summary>
|
|
Chris PeBenito |
57a96c |
## Domain allowed access.
|
|
Chris PeBenito |
885b83 |
## </summary>
|
|
Chris PeBenito |
57a96c |
## </param>
|
|
Chris PeBenito |
57a96c |
#
|
|
Chris PeBenito |
296273 |
interface(`userdom_dontaudit_use_user_terminals',`
|
|
Chris PeBenito |
296273 |
gen_require(`
|
|
Chris PeBenito |
296273 |
type user_tty_device_t, user_devpts_t;
|
|
Chris PeBenito |
296273 |
')
|
|
Chris PeBenito |
296273 |
|
|
Chris PeBenito |
296273 |
dontaudit $1 user_tty_device_t:chr_file rw_term_perms;
|
|
Chris PeBenito |
296273 |
dontaudit $1 user_devpts_t:chr_file rw_term_perms;
|
|
Chris PeBenito |
57a96c |
')
|
|
Chris PeBenito |
57a96c |
|
|
Chris PeBenito |
57a96c |
########################################
|
|
Chris PeBenito |
57a96c |
## <summary>
|
|
Chris PeBenito |
296273 |
## Execute a shell in all user domains. This
|
|
Chris PeBenito |
296273 |
## is an explicit transition, requiring the
|
|
Chris PeBenito |
296273 |
## caller to use setexeccon().
|
|
Chris PeBenito |
57a96c |
## </summary>
|
|
Chris PeBenito |
57a96c |
## <param name="domain">
|
|
Chris PeBenito |
885b83 |
## <summary>
|
|
Chris PeBenito |
57a96c |
## Domain allowed access.
|
|
Chris PeBenito |
885b83 |
## </summary>
|
|
Chris PeBenito |
57a96c |
## </param>
|
|
Chris PeBenito |
57a96c |
#
|
|
Chris PeBenito |
296273 |
interface(`userdom_spec_domtrans_all_users',`
|
|
Chris PeBenito |
296273 |
gen_require(`
|
|
Chris PeBenito |
296273 |
attribute userdomain;
|
|
Chris PeBenito |
296273 |
')
|
|
Chris PeBenito |
296273 |
|
|
Chris PeBenito |
296273 |
corecmd_shell_spec_domtrans($1,userdomain)
|
|
Chris PeBenito |
296273 |
allow userdomain $1:fd use;
|
|
Chris PeBenito |
296273 |
allow userdomain $1:fifo_file rw_file_perms;
|
|
Chris PeBenito |
296273 |
allow userdomain $1:process sigchld;
|
|
Chris PeBenito |
57a96c |
')
|
|
Chris PeBenito |
57a96c |
|
|
Chris PeBenito |
57a96c |
########################################
|
|
Chris PeBenito |
57a96c |
## <summary>
|
|
Chris PeBenito |
296273 |
## Execute an Xserver session in all unprivileged user domains. This
|
|
Chris PeBenito |
296273 |
## is an explicit transition, requiring the
|
|
Chris PeBenito |
296273 |
## caller to use setexeccon().
|
|
Chris PeBenito |
57a96c |
## </summary>
|
|
Chris PeBenito |
57a96c |
## <param name="domain">
|
|
Chris PeBenito |
885b83 |
## <summary>
|
|
Chris PeBenito |
57a96c |
## Domain allowed access.
|
|
Chris PeBenito |
885b83 |
## </summary>
|
|
Chris PeBenito |
57a96c |
## </param>
|
|
Chris PeBenito |
57a96c |
#
|
|
Chris PeBenito |
296273 |
interface(`userdom_xsession_spec_domtrans_all_users',`
|
|
Chris PeBenito |
296273 |
gen_require(`
|
|
Chris PeBenito |
296273 |
attribute userdomain;
|
|
Chris PeBenito |
296273 |
')
|
|
Chris PeBenito |
296273 |
|
|
Chris PeBenito |
296273 |
xserver_xsession_spec_domtrans($1,userdomain)
|
|
Chris PeBenito |
296273 |
allow userdomain $1:fd use;
|
|
Chris PeBenito |
296273 |
allow userdomain $1:fifo_file rw_file_perms;
|
|
Chris PeBenito |
296273 |
allow userdomain $1:process sigchld;
|
|
Chris PeBenito |
57a96c |
')
|
|
Chris PeBenito |
57a96c |
|
|
Chris PeBenito |
57a96c |
########################################
|
|
Chris PeBenito |
57a96c |
## <summary>
|
|
Chris PeBenito |
296273 |
## Execute a shell in all unprivileged user domains. This
|
|
Chris PeBenito |
296273 |
## is an explicit transition, requiring the
|
|
Chris PeBenito |
296273 |
## caller to use setexeccon().
|
|
Chris PeBenito |
e08118 |
## </summary>
|
|
Chris PeBenito |
e08118 |
## <param name="domain">
|
|
Chris PeBenito |
885b83 |
## <summary>
|
|
Chris PeBenito |
e08118 |
## Domain allowed access.
|
|
Chris PeBenito |
885b83 |
## </summary>
|
|
Chris PeBenito |
e08118 |
## </param>
|
|
Chris PeBenito |
e08118 |
#
|
|
Chris PeBenito |
296273 |
interface(`userdom_spec_domtrans_unpriv_users',`
|
|
Chris PeBenito |
e08118 |
gen_require(`
|
|
Chris PeBenito |
296273 |
attribute unpriv_userdomain;
|
|
Chris PeBenito |
e08118 |
')
|
|
Chris PeBenito |
e08118 |
|
|
Chris PeBenito |
296273 |
corecmd_shell_spec_domtrans($1,unpriv_userdomain)
|
|
Chris PeBenito |
296273 |
allow unpriv_userdomain $1:fd use;
|
|
Chris PeBenito |
296273 |
allow unpriv_userdomain $1:fifo_file rw_file_perms;
|
|
Chris PeBenito |
296273 |
allow unpriv_userdomain $1:process sigchld;
|
|
Chris PeBenito |
e08118 |
')
|
|
Chris PeBenito |
e08118 |
|
|
Chris PeBenito |
e08118 |
########################################
|
|
Chris PeBenito |
e08118 |
## <summary>
|
|
Chris PeBenito |
296273 |
## Execute an Xserver session in all unprivileged user domains. This
|
|
Chris PeBenito |
296273 |
## is an explicit transition, requiring the
|
|
Chris PeBenito |
296273 |
## caller to use setexeccon().
|
|
Chris PeBenito |
d4dca5 |
## </summary>
|
|
Chris PeBenito |
d4dca5 |
## <param name="domain">
|
|
Chris PeBenito |
885b83 |
## <summary>
|
|
Chris PeBenito |
d4dca5 |
## Domain allowed access.
|
|
Chris PeBenito |
885b83 |
## </summary>
|
|
Chris PeBenito |
d4dca5 |
## </param>
|
|
Chris PeBenito |
d4dca5 |
#
|
|
Chris PeBenito |
296273 |
interface(`userdom_xsession_spec_domtrans_unpriv_users',`
|
|
Chris PeBenito |
d4dca5 |
gen_require(`
|
|
Chris PeBenito |
296273 |
attribute unpriv_userdomain;
|
|
Chris PeBenito |
d4dca5 |
')
|
|
Chris PeBenito |
d4dca5 |
|
|
Chris PeBenito |
296273 |
xserver_xsession_spec_domtrans($1,unpriv_userdomain)
|
|
Chris PeBenito |
296273 |
allow unpriv_userdomain $1:fd use;
|
|
Chris PeBenito |
296273 |
allow unpriv_userdomain $1:fifo_file rw_file_perms;
|
|
Chris PeBenito |
296273 |
allow unpriv_userdomain $1:process sigchld;
|
|
Chris PeBenito |
d4dca5 |
')
|
|
Chris PeBenito |
d4dca5 |
|
|
Chris PeBenito |
d4dca5 |
########################################
|
|
Chris PeBenito |
d4dca5 |
## <summary>
|
|
Chris PeBenito |
296273 |
## Manage unpriviledged user SysV sempaphores.
|
|
Chris PeBenito |
6f8cda |
## </summary>
|
|
Chris PeBenito |
6f8cda |
## <param name="domain">
|
|
Chris PeBenito |
6f8cda |
## <summary>
|
|
Chris PeBenito |
6f8cda |
## Domain allowed access.
|
|
Chris PeBenito |
6f8cda |
## </summary>
|
|
Chris PeBenito |
6f8cda |
## </param>
|
|
Chris PeBenito |
6f8cda |
#
|
|
Chris PeBenito |
296273 |
interface(`userdom_manage_unpriv_user_semaphores',`
|
|
Chris PeBenito |
6f8cda |
gen_require(`
|
|
Chris PeBenito |
296273 |
attribute unpriv_userdomain;
|
|
Chris PeBenito |
6f8cda |
')
|
|
Chris PeBenito |
6f8cda |
|
|
Chris PeBenito |
296273 |
allow $1 unpriv_userdomain:sem create_sem_perms;
|
|
Chris PeBenito |
6f8cda |
')
|
|
Chris PeBenito |
6f8cda |
|
|
Chris PeBenito |
6f8cda |
########################################
|
|
Chris PeBenito |
6f8cda |
## <summary>
|
|
Chris PeBenito |
296273 |
## Manage unpriviledged user SysV shared
|
|
Chris PeBenito |
296273 |
## memory segments.
|
|
Chris PeBenito |
6f8cda |
## </summary>
|
|
Chris PeBenito |
6f8cda |
## <param name="domain">
|
|
Chris PeBenito |
6f8cda |
## <summary>
|
|
Chris PeBenito |
6f8cda |
## Domain allowed access.
|
|
Chris PeBenito |
6f8cda |
## </summary>
|
|
Chris PeBenito |
6f8cda |
## </param>
|
|
Chris PeBenito |
6f8cda |
#
|
|
Chris PeBenito |
296273 |
interface(`userdom_manage_unpriv_user_shared_mem',`
|
|
Chris PeBenito |
6f8cda |
gen_require(`
|
|
Chris PeBenito |
296273 |
attribute unpriv_userdomain;
|
|
Chris PeBenito |
6f8cda |
')
|
|
Chris PeBenito |
6f8cda |
|
|
Chris PeBenito |
296273 |
allow $1 unpriv_userdomain:shm create_shm_perms;
|
|
Chris PeBenito |
6f8cda |
')
|
|
Chris PeBenito |
6f8cda |
|
|
Chris PeBenito |
6f8cda |
########################################
|
|
Chris PeBenito |
6f8cda |
## <summary>
|
|
Chris PeBenito |
296273 |
## Execute bin_t in the unprivileged user domains. This
|
|
Chris PeBenito |
296273 |
## is an explicit transition, requiring the
|
|
Chris PeBenito |
296273 |
## caller to use setexeccon().
|
|
Chris PeBenito |
43989f |
## </summary>
|
|
Chris PeBenito |
43989f |
## <param name="domain">
|
|
Chris PeBenito |
885b83 |
## <summary>
|
|
Chris PeBenito |
43989f |
## Domain allowed access.
|
|
Chris PeBenito |
885b83 |
## </summary>
|
|
Chris PeBenito |
43989f |
## </param>
|
|
Chris PeBenito |
43989f |
#
|
|
Chris PeBenito |
296273 |
interface(`userdom_bin_spec_domtrans_unpriv_users',`
|
|
Chris PeBenito |
43989f |
gen_require(`
|
|
Chris PeBenito |
296273 |
attribute unpriv_userdomain;
|
|
Chris PeBenito |
43989f |
')
|
|
Chris PeBenito |
43989f |
|
|
Chris PeBenito |
296273 |
corecmd_bin_spec_domtrans($1,unpriv_userdomain)
|
|
Chris PeBenito |
296273 |
allow unpriv_userdomain $1:fd use;
|
|
Chris PeBenito |
296273 |
allow unpriv_userdomain $1:fifo_file rw_file_perms;
|
|
Chris PeBenito |
296273 |
allow unpriv_userdomain $1:process sigchld;
|
|
Chris PeBenito |
725926 |
')
|
|
Chris PeBenito |
725926 |
|
|
Chris PeBenito |
725926 |
########################################
|
|
Chris PeBenito |
725926 |
## <summary>
|
|
Chris PeBenito |
296273 |
## Execute all entrypoint files in unprivileged user
|
|
Chris PeBenito |
296273 |
## domains. This is an explicit transition, requiring the
|
|
Chris PeBenito |
296273 |
## caller to use setexeccon().
|
|
Chris PeBenito |
6820a3 |
## </summary>
|
|
Chris PeBenito |
6820a3 |
## <param name="domain">
|
|
Chris PeBenito |
885b83 |
## <summary>
|
|
Chris PeBenito |
6820a3 |
## Domain allowed access.
|
|
Chris PeBenito |
885b83 |
## </summary>
|
|
Chris PeBenito |
6820a3 |
## </param>
|
|
Chris PeBenito |
6820a3 |
#
|
|
Chris PeBenito |
296273 |
interface(`userdom_entry_spec_domtrans_unpriv_users',`
|
|
Chris PeBenito |
350b6a |
gen_require(`
|
|
Chris PeBenito |
296273 |
attribute unpriv_userdomain;
|
|
Chris PeBenito |
6820a3 |
')
|
|
Chris PeBenito |
350b6a |
|
|
Chris PeBenito |
296273 |
domain_entry_file_spec_domtrans($1,unpriv_userdomain)
|
|
Chris PeBenito |
296273 |
allow unpriv_userdomain $1:fd use;
|
|
Chris PeBenito |
296273 |
allow unpriv_userdomain $1:fifo_file rw_file_perms;
|
|
Chris PeBenito |
296273 |
allow unpriv_userdomain $1:process sigchld;
|
|
Chris PeBenito |
6820a3 |
')
|
|
Chris PeBenito |
6820a3 |
|
|
Chris PeBenito |
6820a3 |
########################################
|
|
Chris PeBenito |
6820a3 |
## <summary>
|
|
Chris PeBenito |
296273 |
## Search users home directories.
|
|
Chris PeBenito |
1504ff |
## </summary>
|
|
Chris PeBenito |
1504ff |
## <param name="domain">
|
|
Chris PeBenito |
885b83 |
## <summary>
|
|
Chris PeBenito |
296273 |
## Domain allowed access.
|
|
Chris PeBenito |
885b83 |
## </summary>
|
|
Chris PeBenito |
1504ff |
## </param>
|
|
Chris PeBenito |
1504ff |
#
|
|
Chris PeBenito |
296273 |
interface(`userdom_search_user_home_content',`
|
|
Chris PeBenito |
350b6a |
gen_require(`
|
|
Chris PeBenito |
296273 |
type user_home_dir_t, user_home_t;
|
|
Chris PeBenito |
1504ff |
')
|
|
Chris PeBenito |
350b6a |
|
|
Chris PeBenito |
296273 |
files_list_home($1)
|
|
Chris PeBenito |
296273 |
allow $1 { user_home_dir_t user_home_t }:dir search_dir_perms;
|
|
Chris PeBenito |
1504ff |
')
|
|
Chris PeBenito |
1504ff |
|
|
Chris PeBenito |
1504ff |
########################################
|
|
Chris PeBenito |
1504ff |
## <summary>
|
|
Chris PeBenito |
296273 |
## Send general signals to unprivileged user domains.
|
|
Chris PeBenito |
f6abfd |
## </summary>
|
|
Chris PeBenito |
f6abfd |
## <param name="domain">
|
|
Chris PeBenito |
885b83 |
## <summary>
|
|
Chris PeBenito |
f6abfd |
## Domain allowed access.
|
|
Chris PeBenito |
885b83 |
## </summary>
|
|
Chris PeBenito |
f6abfd |
## </param>
|
|
Chris PeBenito |
f6abfd |
#
|
|
Chris PeBenito |
296273 |
interface(`userdom_signal_unpriv_users',`
|
|
Chris PeBenito |
f6abfd |
gen_require(`
|
|
Chris PeBenito |
296273 |
attribute unpriv_userdomain;
|
|
Chris PeBenito |
f6abfd |
')
|
|
Chris PeBenito |
f6abfd |
|
|
Chris PeBenito |
296273 |
allow $1 unpriv_userdomain:process signal;
|
|
Chris PeBenito |
f6abfd |
')
|
|
Chris PeBenito |
f6abfd |
|
|
Chris PeBenito |
f6abfd |
########################################
|
|
Chris PeBenito |
f6abfd |
## <summary>
|
|
Chris PeBenito |
296273 |
## Inherit the file descriptors from unprivileged user domains.
|
|
Chris PeBenito |
f6abfd |
## </summary>
|
|
Chris PeBenito |
f6abfd |
## <param name="domain">
|
|
Chris PeBenito |
885b83 |
## <summary>
|
|
Chris PeBenito |
f6abfd |
## Domain allowed access.
|
|
Chris PeBenito |
885b83 |
## </summary>
|
|
Chris PeBenito |
f6abfd |
## </param>
|
|
Chris PeBenito |
f6abfd |
#
|
|
Chris PeBenito |
296273 |
interface(`userdom_use_unpriv_users_fds',`
|
|
Chris PeBenito |
f6abfd |
gen_require(`
|
|
Chris PeBenito |
296273 |
attribute unpriv_userdomain;
|
|
Chris PeBenito |
f6abfd |
')
|
|
Chris PeBenito |
f6abfd |
|
|
Chris PeBenito |
296273 |
allow $1 unpriv_userdomain:fd use;
|
|
Chris PeBenito |
f6abfd |
')
|
|
Chris PeBenito |
f6abfd |
|
|
Chris PeBenito |
f6abfd |
########################################
|
|
Chris PeBenito |
f6abfd |
## <summary>
|
|
Chris PeBenito |
296273 |
## Do not audit attempts to inherit the
|
|
Chris PeBenito |
296273 |
## file descriptors from all user domains.
|
|
Chris PeBenito |
725926 |
## </summary>
|
|
Chris PeBenito |
725926 |
## <param name="domain">
|
|
Chris PeBenito |
885b83 |
## <summary>
|
|
Chris PeBenito |
725926 |
## Domain allowed access.
|
|
Chris PeBenito |
885b83 |
## </summary>
|
|
Chris PeBenito |
725926 |
## </param>
|
|
Chris PeBenito |
725926 |
#
|
|
Chris PeBenito |
296273 |
interface(`userdom_dontaudit_use_unpriv_user_fds',`
|
|
Chris PeBenito |
350b6a |
gen_require(`
|
|
Chris PeBenito |
296273 |
attribute unpriv_userdomain;
|
|
Chris PeBenito |
725926 |
')
|
|
Chris PeBenito |
350b6a |
|
|
Chris PeBenito |
296273 |
dontaudit $1 unpriv_userdomain:fd use;
|
|
Chris PeBenito |
43989f |
')
|
|
Chris PeBenito |
43989f |
|
|
Chris PeBenito |
43989f |
########################################
|
|
Chris PeBenito |
43989f |
## <summary>
|
|
Chris PeBenito |
296273 |
## Do not audit attempts to use user ptys.
|
|
Chris PeBenito |
43989f |
## </summary>
|
|
Chris PeBenito |
43989f |
## <param name="domain">
|
|
Chris PeBenito |
885b83 |
## <summary>
|
|
Chris PeBenito |
296273 |
## Domain to not audit.
|
|
Chris PeBenito |
885b83 |
## </summary>
|
|
Chris PeBenito |
43989f |
## </param>
|
|
Chris PeBenito |
43989f |
#
|
|
Chris PeBenito |
296273 |
interface(`userdom_dontaudit_use_user_ptys',`
|
|
Chris PeBenito |
350b6a |
gen_require(`
|
|
Chris PeBenito |
296273 |
type user_devpts_t;
|
|
Chris PeBenito |
725926 |
')
|
|
Chris PeBenito |
350b6a |
|
|
Chris PeBenito |
296273 |
dontaudit $1 user_devpts_t:chr_file rw_file_perms;
|
|
Chris PeBenito |
43989f |
')
|
|
Chris PeBenito |
43989f |
|
|
Chris PeBenito |
43989f |
########################################
|
|
Chris PeBenito |
43989f |
## <summary>
|
|
Chris PeBenito |
296273 |
## Relabel files to unprivileged user pty types.
|
|
Chris PeBenito |
43989f |
## </summary>
|
|
Chris PeBenito |
43989f |
## <param name="domain">
|
|
Chris PeBenito |
885b83 |
## <summary>
|
|
Chris PeBenito |
43989f |
## Domain allowed access.
|
|
Chris PeBenito |
885b83 |
## </summary>
|
|
Chris PeBenito |
43989f |
## </param>
|
|
Chris PeBenito |
43989f |
#
|
|
Chris PeBenito |
296273 |
interface(`userdom_relabelto_user_ptys',`
|
|
Chris PeBenito |
350b6a |
gen_require(`
|
|
Chris PeBenito |
296273 |
type user_devpts_t;
|
|
Chris PeBenito |
725926 |
')
|
|
Chris PeBenito |
350b6a |
|
|
Chris PeBenito |
296273 |
allow $1 user_devpts_t:chr_file relabelto;
|
|
Chris PeBenito |
43989f |
')
|
|
Chris PeBenito |
43989f |
|
|
Chris PeBenito |
43989f |
########################################
|
|
Chris PeBenito |
43989f |
## <summary>
|
|
Chris PeBenito |
296273 |
## Do not audit attempts to relabel files from
|
|
Chris PeBenito |
296273 |
## user pty types.
|
|
Chris PeBenito |
ab940a |
## </summary>
|
|
Chris PeBenito |
414e41 |
## <param name="domain">
|
|
Chris PeBenito |
885b83 |
## <summary>
|
|
Chris PeBenito |
725926 |
## Domain allowed access.
|
|
Chris PeBenito |
885b83 |
## </summary>
|
|
Chris PeBenito |
414e41 |
## </param>
|
|
Chris PeBenito |
daa0e0 |
#
|
|
Chris PeBenito |
296273 |
interface(`userdom_dontaudit_relabelfrom_user_ptys',`
|
|
Chris PeBenito |
0404a3 |
gen_require(`
|
|
Chris PeBenito |
296273 |
type user_devpts_t;
|
|
Chris PeBenito |
0404a3 |
')
|
|
Chris PeBenito |
0c73cd |
|
|
Chris PeBenito |
296273 |
dontaudit $1 user_devpts_t:chr_file relabelfrom;
|
|
Chris PeBenito |
daa0e0 |
')
|
|
Chris PeBenito |
daa0e0 |
|
|
Chris PeBenito |
ebdc3b |
########################################
|
|
Chris PeBenito |
ebdc3b |
## <summary>
|
|
Chris PeBenito |
296273 |
## Write all users files in /tmp
|
|
Chris PeBenito |
693d4a |
## </summary>
|
|
Chris PeBenito |
693d4a |
## <param name="domain">
|
|
Chris PeBenito |
693d4a |
## <summary>
|
|
Chris PeBenito |
693d4a |
## Domain allowed access.
|
|
Chris PeBenito |
693d4a |
## </summary>
|
|
Chris PeBenito |
693d4a |
## </param>
|
|
Chris PeBenito |
693d4a |
#
|
|
Chris PeBenito |
296273 |
interface(`userdom_write_user_tmp_files',`
|
|
Chris PeBenito |
350b6a |
gen_require(`
|
|
Chris PeBenito |
296273 |
type user_tmp_t;
|
|
Chris PeBenito |
693d4a |
')
|
|
Chris PeBenito |
350b6a |
|
|
Chris PeBenito |
296273 |
allow $1 user_tmp_t:file write_file_perms;
|
|
Chris PeBenito |
693d4a |
')
|
|
Chris PeBenito |
693d4a |
|
|
Chris PeBenito |
693d4a |
########################################
|
|
Chris PeBenito |
693d4a |
## <summary>
|
|
Chris PeBenito |
296273 |
## Do not audit attempts to use user ttys.
|
|
Chris PeBenito |
ebdc3b |
## </summary>
|
|
Chris PeBenito |
ebdc3b |
## <param name="domain">
|
|
Chris PeBenito |
885b83 |
## <summary>
|
|
Chris PeBenito |
725926 |
## Domain allowed access.
|
|
Chris PeBenito |
885b83 |
## </summary>
|
|
Chris PeBenito |
ebdc3b |
## </param>
|
|
Chris PeBenito |
ebdc3b |
#
|
|
Chris PeBenito |
296273 |
interface(`userdom_dontaudit_use_user_ttys',`
|
|
Chris PeBenito |
350b6a |
gen_require(`
|
|
Chris PeBenito |
296273 |
type user_tty_device_t;
|
|
Chris PeBenito |
9cc2cc |
')
|
|
Chris PeBenito |
350b6a |
|
|
Chris PeBenito |
296273 |
dontaudit $1 user_tty_device_t:chr_file rw_file_perms;
|
|
Chris PeBenito |
ebdc3b |
')
|
|
Chris PeBenito |
c98340 |
|
|
Chris PeBenito |
c98340 |
########################################
|
|
Chris PeBenito |
c98340 |
## <summary>
|
|
Chris PeBenito |
2629c6 |
## Read the process state of all user domains.
|
|
Chris PeBenito |
2629c6 |
## </summary>
|
|
Chris PeBenito |
2629c6 |
## <param name="domain">
|
|
Chris PeBenito |
885b83 |
## <summary>
|
|
Chris PeBenito |
2629c6 |
## Domain allowed access.
|
|
Chris PeBenito |
885b83 |
## </summary>
|
|
Chris PeBenito |
2629c6 |
## </param>
|
|
Chris PeBenito |
2629c6 |
#
|
|
Chris PeBenito |
1815ba |
interface(`userdom_read_all_users_state',`
|
|
Chris PeBenito |
2629c6 |
gen_require(`
|
|
Chris PeBenito |
2629c6 |
attribute userdomain;
|
|
Chris PeBenito |
2629c6 |
')
|
|
Chris PeBenito |
2629c6 |
|
|
Chris PeBenito |
c0868a |
read_files_pattern($1,userdomain,userdomain)
|
|
Chris PeBenito |
2629c6 |
kernel_search_proc($1)
|
|
Chris PeBenito |
2629c6 |
')
|
|
Chris PeBenito |
2629c6 |
|
|
Chris PeBenito |
2629c6 |
########################################
|
|
Chris PeBenito |
2629c6 |
## <summary>
|
|
Chris PeBenito |
2629c6 |
## Get the attributes of all user domains.
|
|
Chris PeBenito |
2629c6 |
## </summary>
|
|
Chris PeBenito |
2629c6 |
## <param name="domain">
|
|
Chris PeBenito |
885b83 |
## <summary>
|
|
Chris PeBenito |
2629c6 |
## Domain allowed access.
|
|
Chris PeBenito |
885b83 |
## </summary>
|
|
Chris PeBenito |
2629c6 |
## </param>
|
|
Chris PeBenito |
2629c6 |
#
|
|
Chris PeBenito |
15722e |
interface(`userdom_getattr_all_users',`
|
|
Chris PeBenito |
2629c6 |
gen_require(`
|
|
Chris PeBenito |
2629c6 |
attribute userdomain;
|
|
Chris PeBenito |
2629c6 |
')
|
|
Chris PeBenito |
2629c6 |
|
|
Chris PeBenito |
2629c6 |
allow $1 userdomain:process getattr;
|
|
Chris PeBenito |
2629c6 |
')
|
|
Chris PeBenito |
2629c6 |
|
|
Chris PeBenito |
2629c6 |
########################################
|
|
Chris PeBenito |
2629c6 |
## <summary>
|
|
Chris PeBenito |
57a96c |
## Inherit the file descriptors from all user domains
|
|
Chris PeBenito |
57a96c |
## </summary>
|
|
Chris PeBenito |
57a96c |
## <param name="domain">
|
|
Chris PeBenito |
885b83 |
## <summary>
|
|
Chris PeBenito |
725926 |
## Domain allowed access.
|
|
Chris PeBenito |
885b83 |
## </summary>
|
|
Chris PeBenito |
57a96c |
## </param>
|
|
Chris PeBenito |
57a96c |
#
|
|
Chris PeBenito |
15722e |
interface(`userdom_use_all_users_fds',`
|
|
Chris PeBenito |
57a96c |
gen_require(`
|
|
Chris PeBenito |
57a96c |
attribute userdomain;
|
|
Chris PeBenito |
57a96c |
')
|
|
Chris PeBenito |
57a96c |
|
|
Chris PeBenito |
57a96c |
allow $1 userdomain:fd use;
|
|
Chris PeBenito |
57a96c |
')
|
|
Chris PeBenito |
57a96c |
|
|
Chris PeBenito |
57a96c |
########################################
|
|
Chris PeBenito |
eb3cb6 |
## <summary>
|
|
Chris PeBenito |
eb3cb6 |
## Do not audit attempts to inherit the file
|
|
Chris PeBenito |
eb3cb6 |
## descriptors from any user domains.
|
|
Chris PeBenito |
eb3cb6 |
## </summary>
|
|
Chris PeBenito |
eb3cb6 |
## <param name="domain">
|
|
Chris PeBenito |
885b83 |
## <summary>
|
|
Chris PeBenito |
eb3cb6 |
## Domain to not audit.
|
|
Chris PeBenito |
885b83 |
## </summary>
|
|
Chris PeBenito |
eb3cb6 |
## </param>
|
|
Chris PeBenito |
eb3cb6 |
#
|
|
Chris PeBenito |
15722e |
interface(`userdom_dontaudit_use_all_users_fds',`
|
|
Chris PeBenito |
eb3cb6 |
gen_require(`
|
|
Chris PeBenito |
eb3cb6 |
attribute userdomain;
|
|
Chris PeBenito |
eb3cb6 |
')
|
|
Chris PeBenito |
eb3cb6 |
|
|
Chris PeBenito |
eb3cb6 |
dontaudit $1 userdomain:fd use;
|
|
Chris PeBenito |
eb3cb6 |
')
|
|
Chris PeBenito |
eb3cb6 |
|
|
Chris PeBenito |
eb3cb6 |
########################################
|
|
Chris PeBenito |
57a96c |
## <summary>
|
|
Chris PeBenito |
57a96c |
## Send general signals to all user domains.
|
|
Chris PeBenito |
57a96c |
## </summary>
|
|
Chris PeBenito |
57a96c |
## <param name="domain">
|
|
Chris PeBenito |
885b83 |
## <summary>
|
|
Chris PeBenito |
725926 |
## Domain allowed access.
|
|
Chris PeBenito |
885b83 |
## </summary>
|
|
Chris PeBenito |
57a96c |
## </param>
|
|
Chris PeBenito |
57a96c |
#
|
|
Chris PeBenito |
57a96c |
interface(`userdom_signal_all_users',`
|
|
Chris PeBenito |
57a96c |
gen_require(`
|
|
Chris PeBenito |
57a96c |
attribute userdomain;
|
|
Chris PeBenito |
57a96c |
')
|
|
Chris PeBenito |
57a96c |
|
|
Chris PeBenito |
57a96c |
allow $1 userdomain:process signal;
|
|
Chris PeBenito |
57a96c |
')
|
|
Chris PeBenito |
57a96c |
|
|
Chris PeBenito |
57a96c |
########################################
|
|
Chris PeBenito |
57a96c |
## <summary>
|
|
Chris PeBenito |
246839 |
## Send a SIGCHLD signal to all user domains.
|
|
Chris PeBenito |
246839 |
## </summary>
|
|
Chris PeBenito |
246839 |
## <param name="domain">
|
|
Chris PeBenito |
885b83 |
## <summary>
|
|
Chris PeBenito |
246839 |
## Domain allowed access.
|
|
Chris PeBenito |
885b83 |
## </summary>
|
|
Chris PeBenito |
246839 |
## </param>
|
|
Chris PeBenito |
246839 |
#
|
|
Chris PeBenito |
9fd4b8 |
interface(`userdom_sigchld_all_users',`
|
|
Chris PeBenito |
246839 |
gen_require(`
|
|
Chris PeBenito |
246839 |
attribute userdomain;
|
|
Chris PeBenito |
246839 |
')
|
|
Chris PeBenito |
246839 |
|
|
Chris PeBenito |
a1fcff |
allow $1 userdomain:process sigchld;
|
|
Chris PeBenito |
246839 |
')
|
|
Chris PeBenito |
246839 |
|
|
Chris PeBenito |
246839 |
########################################
|
|
Chris PeBenito |
246839 |
## <summary>
|
|
Chris PeBenito |
fe3a1e |
## Create keys for all user domains.
|
|
Chris PeBenito |
fe3a1e |
## </summary>
|
|
Chris PeBenito |
fe3a1e |
## <param name="domain">
|
|
Chris PeBenito |
fe3a1e |
## <summary>
|
|
Chris PeBenito |
fe3a1e |
## Domain allowed access.
|
|
Chris PeBenito |
fe3a1e |
## </summary>
|
|
Chris PeBenito |
fe3a1e |
## </param>
|
|
Chris PeBenito |
fe3a1e |
#
|
|
Chris PeBenito |
fe3a1e |
interface(`userdom_create_all_users_keys',`
|
|
Chris PeBenito |
350b6a |
gen_require(`
|
|
Chris PeBenito |
350b6a |
attribute userdomain;
|
|
Chris PeBenito |
fe3a1e |
')
|
|
Chris PeBenito |
350b6a |
|
|
Chris PeBenito |
350b6a |
allow $1 userdomain:key create;
|
|
Chris PeBenito |
fe3a1e |
')
|
|
Chris PeBenito |
fe3a1e |
|
|
Chris PeBenito |
fe3a1e |
########################################
|
|
Chris PeBenito |
fe3a1e |
## <summary>
|
|
Chris PeBenito |
9fd4b8 |
## Send a dbus message to all user domains.
|
|
Chris PeBenito |
9fd4b8 |
## </summary>
|
|
Chris PeBenito |
9fd4b8 |
## <param name="domain">
|
|
Chris PeBenito |
885b83 |
## <summary>
|
|
Chris PeBenito |
9fd4b8 |
## Domain allowed access.
|
|
Chris PeBenito |
885b83 |
## </summary>
|
|
Chris PeBenito |
9fd4b8 |
## </param>
|
|
Chris PeBenito |
9fd4b8 |
#
|
|
Chris PeBenito |
9fd4b8 |
interface(`userdom_dbus_send_all_users',`
|
|
Chris PeBenito |
9fd4b8 |
gen_require(`
|
|
Chris PeBenito |
9fd4b8 |
attribute userdomain;
|
|
Chris PeBenito |
9fd4b8 |
class dbus send_msg;
|
|
Chris PeBenito |
9fd4b8 |
')
|
|
Chris PeBenito |
9fd4b8 |
|
|
Chris PeBenito |
9fd4b8 |
allow $1 userdomain:dbus send_msg;
|
|
Chris PeBenito |
9fd4b8 |
')
|