|
Chris PeBenito |
490639 |
## <summary>Policy for user domains</summary>
|
|
Chris PeBenito |
b16c6b |
|
|
Chris PeBenito |
8fd367 |
#######################################
|
|
Chris PeBenito |
8fd367 |
## <summary>
|
|
Chris PeBenito |
8fd367 |
## The template containing rules common to unprivileged
|
|
Chris PeBenito |
8fd367 |
## users and administrative users.
|
|
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 |
##
|
|
Chris PeBenito |
8fd367 |
## This generally should not be used, rather the
|
|
Chris PeBenito |
8fd367 |
## unpriv_user_template or admin_user_template should
|
|
Chris PeBenito |
8fd367 |
## be used.
|
|
Chris PeBenito |
8fd367 |
##
|
|
Chris PeBenito |
8fd367 |
## </desc>
|
|
Chris PeBenito |
8fd367 |
## <param name="userdomain_prefix">
|
|
Chris PeBenito |
8fd367 |
## The prefix of the user domain (e.g., user
|
|
Chris PeBenito |
8fd367 |
## is the prefix for user_t).
|
|
Chris PeBenito |
8fd367 |
## </param>
|
|
Chris PeBenito |
b16c6b |
#
|
|
Chris PeBenito |
8fd367 |
template(`base_user_template',`
|
|
Chris PeBenito |
b16c6b |
|
|
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 |
2e863f |
domain_user_exemption_target($1_t)
|
|
Chris PeBenito |
0c73cd |
role $1_r types $1_t;
|
|
Chris PeBenito |
0c73cd |
allow system_r $1_r;
|
|
Chris PeBenito |
0c73cd |
|
|
Chris PeBenito |
0c73cd |
# user pseudoterminal
|
|
Chris PeBenito |
0c73cd |
type $1_devpts_t;
|
|
Chris PeBenito |
0fd9dc |
term_user_pty($1_t,$1_devpts_t)
|
|
Chris PeBenito |
603f90 |
files_type($1_devpts_t)
|
|
Chris PeBenito |
0c73cd |
|
|
Chris PeBenito |
0c73cd |
# type for contents of home directory
|
|
Chris PeBenito |
0c73cd |
type $1_home_t, $1_file_type, home_type;
|
|
Chris PeBenito |
8fd367 |
files_type($1_home_t)
|
|
Chris PeBenito |
a1fcff |
files_associate_tmp($1_home_t)
|
|
Chris PeBenito |
cff75c |
fs_associate_tmpfs($1_home_t)
|
|
Chris PeBenito |
0c73cd |
|
|
Chris PeBenito |
0c73cd |
# type of home directory
|
|
Chris PeBenito |
0c73cd |
type $1_home_dir_t, home_dir_type, home_type;
|
|
Chris PeBenito |
603f90 |
files_type($1_home_dir_t)
|
|
Chris PeBenito |
a1fcff |
files_associate_tmp($1_home_dir_t)
|
|
Chris PeBenito |
cff75c |
fs_associate_tmpfs($1_home_dir_t)
|
|
Chris PeBenito |
0c73cd |
|
|
Chris PeBenito |
0c73cd |
type $1_tmp_t, $1_file_type;
|
|
Chris PeBenito |
c9428d |
files_tmp_file($1_tmp_t)
|
|
Chris PeBenito |
0c73cd |
|
|
Chris PeBenito |
0c73cd |
type $1_tmpfs_t;
|
|
Chris PeBenito |
c9428d |
files_tmpfs_file($1_tmpfs_t)
|
|
Chris PeBenito |
0c73cd |
|
|
Chris PeBenito |
a1fcff |
# types for network-obtained content
|
|
Chris PeBenito |
a1fcff |
type $1_untrusted_content_t, $1_file_type; #, customizable
|
|
Chris PeBenito |
a1fcff |
files_type($1_untrusted_content_t)
|
|
Chris PeBenito |
a1fcff |
files_poly_member($1_untrusted_content_t)
|
|
Chris PeBenito |
a1fcff |
|
|
Chris PeBenito |
a1fcff |
type $1_untrusted_content_tmp_t, $1_file_type; # customizable
|
|
Chris PeBenito |
a1fcff |
files_tmp_file($1_untrusted_content_tmp_t)
|
|
Chris PeBenito |
a1fcff |
|
|
Chris PeBenito |
0c73cd |
type $1_tty_device_t;
|
|
Chris PeBenito |
0fd9dc |
term_tty($1_t,$1_tty_device_t)
|
|
Chris PeBenito |
0c73cd |
|
|
Chris PeBenito |
0c73cd |
##############################
|
|
Chris PeBenito |
0c73cd |
#
|
|
Chris PeBenito |
6820a3 |
# User home directory file rules
|
|
Chris PeBenito |
6820a3 |
#
|
|
Chris PeBenito |
6820a3 |
|
|
Chris PeBenito |
6820a3 |
allow $1_file_type $1_home_t:filesystem associate;
|
|
Chris PeBenito |
6820a3 |
|
|
Chris PeBenito |
6820a3 |
##############################
|
|
Chris PeBenito |
6820a3 |
#
|
|
Chris PeBenito |
6820a3 |
# User domain Local policy
|
|
Chris PeBenito |
0c73cd |
#
|
|
Chris PeBenito |
0c73cd |
|
|
Chris PeBenito |
0c73cd |
allow $1_t self:capability { setgid chown fowner };
|
|
Chris PeBenito |
0c73cd |
dontaudit $1_t self:capability { sys_nice fsetid };
|
|
Chris PeBenito |
9d3bdc |
allow $1_t self:process ~{ ptrace setcurrent setexec setfscreate setrlimit execmem execstack execheap };
|
|
Chris PeBenito |
0c73cd |
allow $1_t self:process { ptrace setfscreate };
|
|
Chris PeBenito |
0c73cd |
allow $1_t self:fd use;
|
|
Chris PeBenito |
cc41a9 |
allow $1_t self:fifo_file rw_file_perms;
|
|
Chris PeBenito |
cc41a9 |
allow $1_t self:unix_dgram_socket create_socket_perms;
|
|
Chris PeBenito |
0fd9dc |
allow $1_t self:unix_stream_socket create_stream_socket_perms;
|
|
Chris PeBenito |
0c73cd |
allow $1_t self:unix_dgram_socket sendto;
|
|
Chris PeBenito |
0c73cd |
allow $1_t self:unix_stream_socket 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 |
0c73cd |
dontaudit $1_t self:socket create;
|
|
Chris PeBenito |
a1fcff |
allow $1_t self:udp_socket { sendto recvfrom };
|
|
Chris PeBenito |
0c73cd |
|
|
Chris PeBenito |
0c73cd |
# evolution and gnome-session try to create a netlink socket
|
|
Chris PeBenito |
0c73cd |
dontaudit $1_t self:netlink_socket { create ioctl read getattr write setattr append bind connect getopt setopt shutdown };
|
|
Chris PeBenito |
0c73cd |
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 |
0c73cd |
|
|
Chris PeBenito |
0c73cd |
# execute files in the home directory
|
|
Chris PeBenito |
2a9456 |
can_exec($1_t,$1_home_t)
|
|
Chris PeBenito |
0c73cd |
|
|
Chris PeBenito |
0c73cd |
# full control of the home directory
|
|
Chris PeBenito |
cc41a9 |
allow $1_t $1_home_t:file { create_file_perms relabelfrom relabelto };
|
|
Chris PeBenito |
cc41a9 |
allow $1_t $1_home_t:lnk_file { create_lnk_perms relabelfrom relabelto };
|
|
Chris PeBenito |
cc41a9 |
allow $1_t $1_home_t:dir { create_dir_perms relabelfrom relabelto };
|
|
Chris PeBenito |
cc41a9 |
allow $1_t $1_home_t:sock_file { create_file_perms relabelfrom relabelto };
|
|
Chris PeBenito |
cc41a9 |
allow $1_t $1_home_t:fifo_file { create_file_perms relabelfrom relabelto };
|
|
Chris PeBenito |
a1fcff |
allow $1_t $1_home_dir_t:dir { create_dir_perms relabelfrom relabelto };
|
|
Chris PeBenito |
cc41a9 |
type_transition $1_t $1_home_dir_t:{ dir notdevfile_class_set } $1_home_t;
|
|
Chris PeBenito |
0c73cd |
|
|
Chris PeBenito |
2a9456 |
can_exec($1_t,$1_tmp_t)
|
|
Chris PeBenito |
0c73cd |
|
|
Chris PeBenito |
a1fcff |
# user temporary files
|
|
Chris PeBenito |
a1fcff |
allow $1_t $1_tmp_t:file create_file_perms;
|
|
Chris PeBenito |
a1fcff |
allow $1_t $1_tmp_t:lnk_file create_lnk_perms;
|
|
Chris PeBenito |
a1fcff |
allow $1_t $1_tmp_t:dir create_dir_perms;
|
|
Chris PeBenito |
a1fcff |
allow $1_t $1_tmp_t:sock_file create_file_perms;
|
|
Chris PeBenito |
a1fcff |
allow $1_t $1_tmp_t:fifo_file create_file_perms;
|
|
Chris PeBenito |
a1fcff |
files_create_tmp_files($1_t, $1_tmp_t, { dir notdevfile_class_set })
|
|
Chris PeBenito |
a1fcff |
|
|
Chris PeBenito |
0c73cd |
# Bind to a Unix domain socket in /tmp.
|
|
Chris PeBenito |
0c73cd |
# cjp: this is combination is not checked and should be removed
|
|
Chris PeBenito |
0c73cd |
allow $1_t $1_tmp_t:unix_stream_socket name_bind;
|
|
Chris PeBenito |
0c73cd |
|
|
Chris PeBenito |
cc41a9 |
allow $1_t $1_tmpfs_t:dir rw_dir_perms;
|
|
Chris PeBenito |
cc41a9 |
allow $1_t $1_tmpfs_t:file create_file_perms;
|
|
Chris PeBenito |
cc41a9 |
allow $1_t $1_tmpfs_t:lnk_file create_lnk_perms;
|
|
Chris PeBenito |
cc41a9 |
allow $1_t $1_tmpfs_t:sock_file create_file_perms;
|
|
Chris PeBenito |
cc41a9 |
allow $1_t $1_tmpfs_t:fifo_file create_file_perms;
|
|
Chris PeBenito |
0fd9dc |
fs_create_tmpfs_data($1_t,$1_tmpfs_t, { dir notdevfile_class_set } )
|
|
Chris PeBenito |
0c73cd |
|
|
Chris PeBenito |
cc41a9 |
allow $1_t $1_tty_device_t:chr_file { setattr rw_file_perms };
|
|
Chris PeBenito |
0c73cd |
|
|
Chris PeBenito |
a1fcff |
# Allow user to relabel untrusted content
|
|
Chris PeBenito |
a1fcff |
allow $1_t { $1_untrusted_content_t $1_untrusted_content_tmp_t }:dir { create_dir_perms relabelto relabelfrom };
|
|
Chris PeBenito |
a1fcff |
allow $1_t { $1_untrusted_content_t $1_untrusted_content_tmp_t }:file { getattr unlink relabelto relabelfrom rename };
|
|
Chris PeBenito |
a1fcff |
|
|
Chris PeBenito |
0c73cd |
allow $1_t unpriv_userdomain:fd use;
|
|
Chris PeBenito |
0c73cd |
|
|
Chris PeBenito |
0c73cd |
# Instantiate derived domains for a number of programs.
|
|
Chris PeBenito |
0c73cd |
# These derived domains encode both information about the calling
|
|
Chris PeBenito |
0c73cd |
# user domain and the program, and allow us to maintain separation
|
|
Chris PeBenito |
0c73cd |
# between different instances of the program being run by different
|
|
Chris PeBenito |
0c73cd |
# user domains.
|
|
Chris PeBenito |
451c1e |
per_userdomain_templates($1,$1_t,$1_r)
|
|
Chris PeBenito |
0c73cd |
|
|
Chris PeBenito |
0c73cd |
kernel_read_kernel_sysctl($1_t)
|
|
Chris PeBenito |
ac9aa2 |
kernel_dontaudit_list_unlabeled($1_t)
|
|
Chris PeBenito |
ac9aa2 |
kernel_dontaudit_getattr_unlabeled_file($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 |
ac9aa2 |
kernel_dontaudit_getattr_unlabeled_blk_dev($1_t)
|
|
Chris PeBenito |
ac9aa2 |
kernel_dontaudit_getattr_unlabeled_chr_dev($1_t)
|
|
Chris PeBenito |
0c73cd |
# Very permissive allowing every domain to see every type:
|
|
Chris PeBenito |
0c73cd |
kernel_get_sysvipc_info($1_t)
|
|
Chris PeBenito |
0c73cd |
# Find CDROM devices:
|
|
Chris PeBenito |
0c73cd |
kernel_read_device_sysctl($1_t)
|
|
Chris PeBenito |
ebdc3b |
|
|
Chris PeBenito |
ebdc3b |
dev_rw_power_management($1_t)
|
|
Chris PeBenito |
0c73cd |
# GNOME checks for usb and other devices:
|
|
Chris PeBenito |
8bd678 |
dev_rw_usbfs($1_t)
|
|
Chris PeBenito |
0fd9dc |
|
|
Chris PeBenito |
0fd9dc |
corenet_tcp_sendrecv_all_if($1_t)
|
|
Chris PeBenito |
0fd9dc |
corenet_raw_sendrecv_all_if($1_t)
|
|
Chris PeBenito |
0fd9dc |
corenet_udp_sendrecv_all_if($1_t)
|
|
Chris PeBenito |
0fd9dc |
corenet_tcp_sendrecv_all_nodes($1_t)
|
|
Chris PeBenito |
0fd9dc |
corenet_raw_sendrecv_all_nodes($1_t)
|
|
Chris PeBenito |
0fd9dc |
corenet_udp_sendrecv_all_nodes($1_t)
|
|
Chris PeBenito |
0fd9dc |
corenet_tcp_sendrecv_all_ports($1_t)
|
|
Chris PeBenito |
0fd9dc |
corenet_udp_sendrecv_all_ports($1_t)
|
|
Chris PeBenito |
0fd9dc |
corenet_tcp_bind_all_nodes($1_t)
|
|
Chris PeBenito |
0fd9dc |
corenet_udp_bind_all_nodes($1_t)
|
|
Chris PeBenito |
0fd9dc |
corenet_udp_bind_generic_port($1_t)
|
|
Chris PeBenito |
98a8ea |
corenet_tcp_connect_all_ports($1_t)
|
|
Chris PeBenito |
0c73cd |
|
|
Karl MacMillan |
f0c985 |
dev_read_input($1_t)
|
|
Karl MacMillan |
f0c985 |
dev_read_misc($1_t)
|
|
Karl MacMillan |
f0c985 |
dev_write_misc($1_t)
|
|
Karl MacMillan |
f0c985 |
dev_write_snd_dev($1_t)
|
|
Karl MacMillan |
f0c985 |
dev_read_snd_dev($1_t)
|
|
Karl MacMillan |
f0c985 |
dev_read_snd_mixer_dev($1_t)
|
|
Karl MacMillan |
f0c985 |
dev_write_snd_mixer_dev($1_t)
|
|
Karl MacMillan |
f0c985 |
dev_read_rand($1_t)
|
|
Karl MacMillan |
f0c985 |
dev_read_urand($1_t)
|
|
Chris PeBenito |
0c73cd |
# open office is looking for the following
|
|
Karl MacMillan |
f0c985 |
dev_getattr_agp_dev($1_t)
|
|
Karl MacMillan |
f0c985 |
dev_dontaudit_rw_dri_dev($1_t)
|
|
Chris PeBenito |
0c73cd |
|
|
Chris PeBenito |
763c44 |
fs_get_all_fs_quotas($1_t)
|
|
Chris PeBenito |
0fd9dc |
fs_getattr_all_fs($1_t)
|
|
Chris PeBenito |
ac9aa2 |
fs_getattr_all_dirs($1_t)
|
|
Chris PeBenito |
ab940a |
fs_search_auto_mountpoints($1_t)
|
|
Chris PeBenito |
a1fcff |
|
|
Chris PeBenito |
a1fcff |
# cjp: some of this probably can be removed
|
|
Chris PeBenito |
a1fcff |
selinux_get_fs_mount($1_t)
|
|
Chris PeBenito |
a1fcff |
selinux_validate_context($1_t)
|
|
Chris PeBenito |
a1fcff |
selinux_compute_access_vector($1_t)
|
|
Chris PeBenito |
a1fcff |
selinux_compute_create_context($1_t)
|
|
Chris PeBenito |
a1fcff |
selinux_compute_relabel_context($1_t)
|
|
Chris PeBenito |
a1fcff |
selinux_compute_user_contexts($1_t)
|
|
Chris PeBenito |
0c73cd |
|
|
Chris PeBenito |
0c73cd |
# for eject
|
|
Chris PeBenito |
0fd9dc |
storage_getattr_fixed_disk($1_t)
|
|
Chris PeBenito |
0c73cd |
|
|
Chris PeBenito |
c9428d |
auth_read_login_records($1_t)
|
|
Chris PeBenito |
c9428d |
auth_dontaudit_write_login_records($1_t)
|
|
Chris PeBenito |
ac9aa2 |
auth_search_pam_console_data($1_t)
|
|
Chris PeBenito |
c9428d |
auth_run_pam($1_t,$1_r,{ $1_tty_device_t $1_devpts_t })
|
|
Chris PeBenito |
c9428d |
auth_run_utempter($1_t,$1_r,{ $1_tty_device_t $1_devpts_t })
|
|
Chris PeBenito |
0c73cd |
|
|
Chris PeBenito |
c9428d |
corecmd_exec_bin($1_t)
|
|
Chris PeBenito |
c9428d |
corecmd_exec_sbin($1_t)
|
|
Chris PeBenito |
c9428d |
corecmd_exec_ls($1_t)
|
|
Chris PeBenito |
0c73cd |
|
|
Chris PeBenito |
c9428d |
domain_exec_all_entry_files($1_t)
|
|
Chris PeBenito |
c9428d |
domain_use_wide_inherit_fd($1_t)
|
|
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 |
8fd367 |
files_exec_etc_files($1_t)
|
|
Chris PeBenito |
ae9e27 |
files_search_locks($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 |
a2868f |
files_dontaudit_getattr_non_security_blk_dev($1_t)
|
|
Chris PeBenito |
a2868f |
files_dontaudit_getattr_non_security_chr_dev($1_t)
|
|
Chris PeBenito |
0c73cd |
|
|
Chris PeBenito |
0c73cd |
# Caused by su - init scripts
|
|
Chris PeBenito |
c9428d |
init_dontaudit_use_script_pty($1_t)
|
|
Chris PeBenito |
0c73cd |
|
|
Chris PeBenito |
c9428d |
libs_use_ld_so($1_t)
|
|
Chris PeBenito |
c9428d |
libs_use_shared_libs($1_t)
|
|
Chris PeBenito |
c9428d |
libs_exec_ld_so($1_t)
|
|
Chris PeBenito |
c9428d |
libs_exec_lib_files($1_t)
|
|
Chris PeBenito |
0c73cd |
|
|
Chris PeBenito |
c9428d |
logging_dontaudit_getattr_all_logs($1_t)
|
|
Chris PeBenito |
0c73cd |
|
|
Chris PeBenito |
0c73cd |
miscfiles_read_localization($1_t)
|
|
Chris PeBenito |
a1fcff |
miscfiles_read_fonts($1_t)
|
|
Chris PeBenito |
2ec4c9 |
# for running TeX programs
|
|
Chris PeBenito |
2ec4c9 |
miscfiles_read_tetex_data($1_t)
|
|
Chris PeBenito |
2ec4c9 |
miscfiles_exec_tetex_data($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 |
5e0da6 |
seutil_run_newrole($1_t,$1_r,{ $1_devpts_t $1_tty_device_t })
|
|
Chris PeBenito |
0c73cd |
|
|
Chris PeBenito |
c9428d |
mta_rw_spool($1_t)
|
|
Chris PeBenito |
0c73cd |
|
|
Chris PeBenito |
34c8fa |
tunable_policy(`allow_execmem',`
|
|
Chris PeBenito |
0c73cd |
# Allow loading DSOs that require executable stack.
|
|
Chris PeBenito |
0c73cd |
allow $1_t self:process execmem;
|
|
Chris PeBenito |
34c8fa |
')
|
|
Chris PeBenito |
0c73cd |
|
|
Chris PeBenito |
a1fcff |
tunable_policy(`allow_execmem && allow_execstack',`
|
|
Chris PeBenito |
a1fcff |
# Allow making the stack executable via mprotect.
|
|
Chris PeBenito |
a1fcff |
allow $1_t self:process execstack;
|
|
Chris PeBenito |
a1fcff |
')
|
|
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 |
files_dontaudit_list_default($1_t)
|
|
Chris PeBenito |
a1fcff |
files_dontaudit_read_default_files($1_t)
|
|
Chris PeBenito |
a1fcff |
')
|
|
Chris PeBenito |
a1fcff |
|
|
Chris PeBenito |
a1fcff |
tunable_policy(`read_untrusted_content',`
|
|
Chris PeBenito |
a1fcff |
allow $1_t { $1_untrusted_content_t $1_untrusted_content_tmp_t }:dir r_dir_perms;
|
|
Chris PeBenito |
a1fcff |
allow $1_t { $1_untrusted_content_t $1_untrusted_content_tmp_t }:file r_file_perms;
|
|
Chris PeBenito |
a1fcff |
allow $1_t { $1_untrusted_content_t $1_untrusted_content_tmp_t }:lnk_file { getattr read };
|
|
Chris PeBenito |
a1fcff |
',`
|
|
Chris PeBenito |
a1fcff |
dontaudit $1_t { $1_untrusted_content_t $1_untrusted_content_tmp_t }:dir r_dir_perms;
|
|
Chris PeBenito |
a1fcff |
dontaudit $1_t { $1_untrusted_content_t $1_untrusted_content_tmp_t }:file r_file_perms;
|
|
Chris PeBenito |
2ec4c9 |
')
|
|
Chris PeBenito |
2ec4c9 |
|
|
Chris PeBenito |
34c8fa |
tunable_policy(`use_nfs_home_dirs',`
|
|
Chris PeBenito |
0fd9dc |
fs_manage_nfs_dirs($1_t)
|
|
Chris PeBenito |
763c44 |
fs_manage_nfs_files($1_t)
|
|
Chris PeBenito |
0fd9dc |
fs_manage_nfs_symlinks($1_t)
|
|
Chris PeBenito |
763c44 |
fs_manage_nfs_named_sockets($1_t)
|
|
Chris PeBenito |
763c44 |
fs_manage_nfs_named_pipes($1_t)
|
|
Chris PeBenito |
763c44 |
fs_execute_nfs_files($1_t)
|
|
Chris PeBenito |
a1fcff |
',`
|
|
Chris PeBenito |
a1fcff |
fs_dontaudit_manage_nfs_dirs($1_t)
|
|
Chris PeBenito |
a1fcff |
fs_dontaudit_manage_nfs_files($1_t)
|
|
Chris PeBenito |
34c8fa |
')
|
|
Chris PeBenito |
0c73cd |
|
|
Chris PeBenito |
34c8fa |
tunable_policy(`use_samba_home_dirs',`
|
|
Chris PeBenito |
0fd9dc |
fs_manage_cifs_dirs($1_t)
|
|
Chris PeBenito |
0fd9dc |
fs_manage_cifs_files($1_t)
|
|
Chris PeBenito |
0fd9dc |
fs_manage_cifs_symlinks($1_t)
|
|
Chris PeBenito |
0fd9dc |
fs_manage_cifs_named_sockets($1_t)
|
|
Chris PeBenito |
0fd9dc |
fs_manage_cifs_named_pipes($1_t)
|
|
Chris PeBenito |
0fd9dc |
fs_execute_cifs_files($1_t)
|
|
Chris PeBenito |
a1fcff |
',`
|
|
Chris PeBenito |
a1fcff |
fs_dontaudit_manage_cifs_dirs($1_t)
|
|
Chris PeBenito |
a1fcff |
fs_dontaudit_manage_cifs_files($1_t)
|
|
Chris PeBenito |
34c8fa |
')
|
|
Chris PeBenito |
0c73cd |
|
|
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 |
ac9aa2 |
optional_policy(`apm',`
|
|
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 |
132880 |
optional_policy(`canna',`
|
|
Chris PeBenito |
350948 |
canna_stream_connect($1_t)
|
|
Chris PeBenito |
350948 |
')
|
|
Chris PeBenito |
350948 |
|
|
Chris PeBenito |
9fd4b8 |
optional_policy(`cups',`
|
|
Chris PeBenito |
9fd4b8 |
cups_stream_connect_ptal($1_t)
|
|
Chris PeBenito |
9fd4b8 |
')
|
|
Chris PeBenito |
9fd4b8 |
|
|
Chris PeBenito |
132880 |
optional_policy(`dbus',`
|
|
Chris PeBenito |
0c3d17 |
dbus_system_bus_client_template($1,$1_t)
|
|
Chris PeBenito |
d828b5 |
|
|
Chris PeBenito |
9fd4b8 |
optional_policy(`cups',`
|
|
Chris PeBenito |
9fd4b8 |
cups_dbus_chat_config($1_t)
|
|
Chris PeBenito |
9fd4b8 |
')
|
|
Chris PeBenito |
9fd4b8 |
|
|
Chris PeBenito |
ac9aa2 |
optional_policy(`hal',`
|
|
Chris PeBenito |
ac9aa2 |
hal_dbus_chat($1_t)
|
|
Chris PeBenito |
ac9aa2 |
')
|
|
Chris PeBenito |
ac9aa2 |
|
|
Chris PeBenito |
d828b5 |
optional_policy(`networkmanager',`
|
|
Chris PeBenito |
d828b5 |
networkmanager_dbus_chat($1_t)
|
|
Chris PeBenito |
d828b5 |
')
|
|
Chris PeBenito |
0c3d17 |
')
|
|
Chris PeBenito |
0c3d17 |
|
|
Chris PeBenito |
132880 |
optional_policy(`dictd',`
|
|
Chris PeBenito |
ac0483 |
dictd_use($1_t)
|
|
Chris PeBenito |
ac0483 |
')
|
|
Chris PeBenito |
ac0483 |
|
|
Chris PeBenito |
132880 |
optional_policy(`ftp',`
|
|
Chris PeBenito |
fc6524 |
tunable_policy(`ftpd_is_daemon',`
|
|
Chris PeBenito |
fc6524 |
ftp_tcp_connect($1_t)
|
|
Chris PeBenito |
fc6524 |
')
|
|
Chris PeBenito |
fc6524 |
')
|
|
Chris PeBenito |
fc6524 |
|
|
Chris PeBenito |
132880 |
optional_policy(`finger',`
|
|
Chris PeBenito |
d4dca5 |
finger_tcp_connect($1_t)
|
|
Chris PeBenito |
d4dca5 |
')
|
|
Chris PeBenito |
d4dca5 |
|
|
Chris PeBenito |
132880 |
optional_policy(`inetd',`
|
|
Chris PeBenito |
81343a |
inetd_tcp_connect($1_t)
|
|
Chris PeBenito |
ac9aa2 |
inetd_udp_sendto($1_t)
|
|
Chris PeBenito |
ac9aa2 |
inetd_use_fd($1_t)
|
|
Chris PeBenito |
ac9aa2 |
inetd_rw_tcp_socket($1_t)
|
|
Chris PeBenito |
b24f35 |
')
|
|
Chris PeBenito |
b24f35 |
|
|
Chris PeBenito |
132880 |
optional_policy(`inn',`
|
|
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 |
132880 |
optional_policy(`nis',`
|
|
Chris PeBenito |
ab940a |
nis_use_ypbind($1_t)
|
|
Chris PeBenito |
ab940a |
')
|
|
Chris PeBenito |
ab940a |
|
|
Chris PeBenito |
132880 |
optional_policy(`mysql',`
|
|
Chris PeBenito |
ac9aa2 |
ifdef(`strict_policy',`
|
|
Chris PeBenito |
42be7c |
tunable_policy(`allow_user_mysql_connect',`
|
|
Chris PeBenito |
42be7c |
mysql_stream_connect($1_t)
|
|
Chris PeBenito |
42be7c |
')
|
|
Chris PeBenito |
42be7c |
')
|
|
Chris PeBenito |
42be7c |
')
|
|
Chris PeBenito |
42be7c |
|
|
Chris PeBenito |
132880 |
optional_policy(`nscd',`
|
|
Chris PeBenito |
493d6c |
nscd_use_socket($1_t)
|
|
Chris PeBenito |
493d6c |
')
|
|
Chris PeBenito |
493d6c |
|
|
Chris PeBenito |
132880 |
optional_policy(`pcmcia',`
|
|
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 |
ac9aa2 |
optional_policy(`portmap',`
|
|
Chris PeBenito |
ac9aa2 |
portmap_tcp_connect($1_t)
|
|
Chris PeBenito |
ac9aa2 |
')
|
|
Chris PeBenito |
ac9aa2 |
|
|
Chris PeBenito |
132880 |
optional_policy(`quota',`
|
|
Chris PeBenito |
052c95 |
quota_dontaudit_getattr_db($1_t)
|
|
Chris PeBenito |
052c95 |
')
|
|
Chris PeBenito |
052c95 |
|
|
Chris PeBenito |
f00434 |
optional_policy(`rpc',`
|
|
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 |
132880 |
optional_policy(`rpm',`
|
|
Chris PeBenito |
b24f35 |
files_getattr_var_lib_dir($1_t)
|
|
Chris PeBenito |
b24f35 |
files_search_var_lib($1_t)
|
|
Chris PeBenito |
b24f35 |
')
|
|
Chris PeBenito |
b24f35 |
|
|
Chris PeBenito |
ac9aa2 |
optional_policy(`samba',`
|
|
Chris PeBenito |
ac9aa2 |
samba_connect_winbind($1_t)
|
|
Chris PeBenito |
ac9aa2 |
')
|
|
Chris PeBenito |
ac9aa2 |
|
|
Chris PeBenito |
132880 |
optional_policy(`squid',`
|
|
Chris PeBenito |
0f707d |
squid_use($1_t)
|
|
Chris PeBenito |
0f707d |
')
|
|
Chris PeBenito |
0f707d |
|
|
Chris PeBenito |
132880 |
optional_policy(`usermanage',`
|
|
Chris PeBenito |
c9428d |
usermanage_run_chfn($1_t,$1_r,{ $1_devpts_t $1_tty_device_t })
|
|
Chris PeBenito |
c9428d |
usermanage_run_passwd($1_t,$1_r,{ $1_devpts_t $1_tty_device_t })
|
|
Chris PeBenito |
0c73cd |
')
|
|
Chris PeBenito |
0c73cd |
|
|
Chris PeBenito |
0c73cd |
ifdef(`TODO',`
|
|
Chris PeBenito |
0c73cd |
#
|
|
Chris PeBenito |
0c73cd |
# Cups daemon running as user tries to write /etc/printcap
|
|
Chris PeBenito |
0c73cd |
#
|
|
Chris PeBenito |
0c73cd |
dontaudit $1_t usr_t:file setattr;
|
|
Chris PeBenito |
0c73cd |
|
|
Chris PeBenito |
0c73cd |
# Check to see if cdrom is mounted
|
|
Chris PeBenito |
0c73cd |
allow $1_t mnt_t:dir { getattr search };
|
|
Chris PeBenito |
0c73cd |
|
|
Chris PeBenito |
0c73cd |
# /initrd is left mounted, various programs try to look at it
|
|
Chris PeBenito |
0c73cd |
dontaudit $1_t ramfs_t:dir getattr;
|
|
Chris PeBenito |
0c73cd |
|
|
Chris PeBenito |
0c73cd |
#
|
|
Chris PeBenito |
0c73cd |
# Running ifconfig as a user generates the following
|
|
Chris PeBenito |
0c73cd |
#
|
|
Chris PeBenito |
0c73cd |
dontaudit $1_t sysctl_net_t:dir search;
|
|
Chris PeBenito |
0c73cd |
|
|
Chris PeBenito |
0c73cd |
r_dir_file($1_t, usercanread)
|
|
Chris PeBenito |
0c73cd |
|
|
Chris PeBenito |
a2868f |
# old browser_domain():
|
|
Chris PeBenito |
a1fcff |
dontaudit $1 { fs_type proc_fs dev_fs sysctl_type }:dir_file_class_set getattr;
|
|
Chris PeBenito |
a1fcff |
dontaudit $1 { fs_type proc_fs dev_fs sysctl_type }:dir search;
|
|
Chris PeBenito |
a1fcff |
dontaudit $1 { fs_type proc_fs dev_fs sysctl_type }:dir read;
|
|
Chris PeBenito |
3eed10 |
|
|
Chris PeBenito |
0c73cd |
allow $1_t usbtty_device_t:chr_file read;
|
|
Chris PeBenito |
0c73cd |
|
|
Chris PeBenito |
0c73cd |
can_resmgrd_connect($1_t)
|
|
Chris PeBenito |
0c73cd |
|
|
Chris PeBenito |
a1fcff |
# Use X
|
|
Chris PeBenito |
a1fcff |
x_client_domain($1, $1)
|
|
Chris PeBenito |
a1fcff |
|
|
Chris PeBenito |
0c73cd |
ifdef(`xserver.te', `
|
|
Chris PeBenito |
0c73cd |
allow $1_t xserver_misc_device_t:{ chr_file blk_file } rw_file_perms;
|
|
Chris PeBenito |
0c73cd |
')
|
|
Chris PeBenito |
0c73cd |
|
|
Chris PeBenito |
0c73cd |
ifdef(`xdm.te', `
|
|
Chris PeBenito |
0c73cd |
# Connect to the X server run by the X Display Manager.
|
|
Chris PeBenito |
0c73cd |
can_unix_connect($1_t, xdm_t)
|
|
Chris PeBenito |
0c73cd |
# certain apps want to read xdm.pid file
|
|
Chris PeBenito |
0c73cd |
r_dir_file($1_t, xdm_var_run_t)
|
|
Chris PeBenito |
cc41a9 |
allow $1_t xdm_var_lib_t:file r_file_perms;
|
|
Chris PeBenito |
0c73cd |
allow xdm_t $1_home_dir_t:dir getattr;
|
|
Chris PeBenito |
0c73cd |
ifdef(`xauth.te', `
|
|
Chris PeBenito |
0c73cd |
file_type_auto_trans(xdm_t, $1_home_dir_t, $1_xauth_home_t, file)
|
|
Chris PeBenito |
0c73cd |
')
|
|
Chris PeBenito |
a1fcff |
')
|
|
Chris PeBenito |
a1fcff |
|
|
Chris PeBenito |
a1fcff |
# start read_fonts()
|
|
Chris PeBenito |
ac9aa2 |
# cjp: these types come in from fontconfig
|
|
Chris PeBenito |
a1fcff |
# Manipulate the global font cache
|
|
Chris PeBenito |
a1fcff |
create_dir_file($1, $1_fonts_cache_t)
|
|
Chris PeBenito |
0c73cd |
|
|
Chris PeBenito |
a1fcff |
# Read per user fonts and font config
|
|
Chris PeBenito |
a1fcff |
r_dir_file($1, $1_fonts_t)
|
|
Chris PeBenito |
a1fcff |
r_dir_file($1, $1_fonts_config_t)
|
|
Chris PeBenito |
a1fcff |
|
|
Chris PeBenito |
a1fcff |
# There are some fonts in .gnome2
|
|
Chris PeBenito |
a1fcff |
ifdef(`gnome.te', `
|
|
Chris PeBenito |
a1fcff |
allow $1 $2_gnome_settings_t:dir { getattr search };
|
|
Chris PeBenito |
0c73cd |
')
|
|
Chris PeBenito |
a1fcff |
# end read_fonts()
|
|
Chris PeBenito |
0c73cd |
') dnl endif TODO
|
|
Chris PeBenito |
b16c6b |
|
|
Chris PeBenito |
2ec4c9 |
')
|
|
Chris PeBenito |
b16c6b |
|
|
Chris PeBenito |
8fd367 |
#######################################
|
|
Chris PeBenito |
8fd367 |
## <summary>
|
|
Chris PeBenito |
8fd367 |
## The template for creating a unprivileged 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 |
8fd367 |
## The prefix of the user domain (e.g., user
|
|
Chris PeBenito |
8fd367 |
## is the prefix for user_t).
|
|
Chris PeBenito |
8fd367 |
## </param>
|
|
Chris PeBenito |
b16c6b |
#
|
|
Chris PeBenito |
8fd367 |
template(`unpriv_user_template', `
|
|
Chris PeBenito |
0c73cd |
##############################
|
|
Chris PeBenito |
0c73cd |
#
|
|
Chris PeBenito |
0c73cd |
# Declarations
|
|
Chris PeBenito |
0c73cd |
#
|
|
Chris PeBenito |
b16c6b |
|
|
Chris PeBenito |
0c73cd |
# Inherit rules for ordinary users.
|
|
Chris PeBenito |
8fd367 |
base_user_template($1)
|
|
Chris PeBenito |
b16c6b |
|
|
Chris PeBenito |
0f707d |
typeattribute $1_t unpriv_userdomain;
|
|
Chris PeBenito |
c9428d |
domain_wide_inherit_fd($1_t)
|
|
Chris PeBenito |
b16c6b |
|
|
Chris PeBenito |
23ca91 |
typeattribute $1_devpts_t user_ptynode;
|
|
Chris PeBenito |
a1fcff |
|
|
Chris PeBenito |
23ca91 |
typeattribute $1_home_dir_t user_home_dir_type;
|
|
Chris PeBenito |
a1fcff |
files_poly($1_home_dir_t)
|
|
Chris PeBenito |
a1fcff |
|
|
Chris PeBenito |
23ca91 |
typeattribute $1_home_t user_home_type;
|
|
Chris PeBenito |
a1fcff |
files_poly_member($1_home_t)
|
|
Chris PeBenito |
a1fcff |
|
|
Chris PeBenito |
ab940a |
typeattribute $1_tmp_t user_tmpfile;
|
|
Chris PeBenito |
ebdc3b |
typeattribute $1_tty_device_t user_ttynode;
|
|
Chris PeBenito |
b16c6b |
|
|
Chris PeBenito |
0c73cd |
##############################
|
|
Chris PeBenito |
0c73cd |
#
|
|
Chris PeBenito |
0c73cd |
# Local policy
|
|
Chris PeBenito |
0c73cd |
#
|
|
Chris PeBenito |
0c73cd |
|
|
Chris PeBenito |
0c73cd |
allow $1_t $1_devpts_t:chr_file { setattr ioctl read getattr lock write append };
|
|
Chris PeBenito |
0fd9dc |
term_create_pty($1_t,$1_devpts_t)
|
|
Chris PeBenito |
0c73cd |
|
|
Chris PeBenito |
0c73cd |
# Rules used to associate a homedir as a mountpoint
|
|
Chris PeBenito |
0c73cd |
allow $1_home_t self:filesystem associate;
|
|
Chris PeBenito |
0c73cd |
allow $1_file_type $1_home_t:filesystem associate;
|
|
Chris PeBenito |
0c73cd |
|
|
Chris PeBenito |
0c73cd |
# privileged home directory writers
|
|
Chris PeBenito |
cc41a9 |
allow privhome $1_home_t:file create_file_perms;
|
|
Chris PeBenito |
cc41a9 |
allow privhome $1_home_t:lnk_file create_lnk_perms;
|
|
Chris PeBenito |
cc41a9 |
allow privhome $1_home_t:dir create_dir_perms;
|
|
Chris PeBenito |
cc41a9 |
allow privhome $1_home_t:sock_file create_file_perms;
|
|
Chris PeBenito |
cc41a9 |
allow privhome $1_home_t:fifo_file create_file_perms;
|
|
Chris PeBenito |
cc41a9 |
type_transition privhome $1_home_dir_t:{ dir notdevfile_class_set } $1_home_t;
|
|
Chris PeBenito |
0c73cd |
|
|
Chris PeBenito |
0c73cd |
kernel_read_system_state($1_t)
|
|
Chris PeBenito |
0c73cd |
kernel_read_network_state($1_t)
|
|
Chris PeBenito |
8bd678 |
dev_read_sysfs($1_t)
|
|
Chris PeBenito |
0c73cd |
|
|
Chris PeBenito |
0c73cd |
# cjp: why?
|
|
Chris PeBenito |
0c73cd |
bootloader_read_kernel_symbol_table($1_t)
|
|
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 |
0c73cd |
|
|
Chris PeBenito |
8fd367 |
files_read_etc_files($1_t)
|
|
Chris PeBenito |
c9428d |
files_list_home($1_t)
|
|
Chris PeBenito |
c9428d |
files_read_usr_files($1_t)
|
|
Chris PeBenito |
2ec4c9 |
files_exec_usr_files($1_t)
|
|
Chris PeBenito |
2ec4c9 |
# Read directories and files with the readable_t type.
|
|
Chris PeBenito |
2ec4c9 |
# This type is a general type for "world"-readable files.
|
|
Chris PeBenito |
2ec4c9 |
files_list_world_readable($1_t)
|
|
Chris PeBenito |
2ec4c9 |
files_read_world_readable_files($1_t)
|
|
Chris PeBenito |
2ec4c9 |
files_read_world_readable_symlinks($1_t)
|
|
Chris PeBenito |
2ec4c9 |
files_read_world_readable_pipes($1_t)
|
|
Chris PeBenito |
2ec4c9 |
files_read_world_readable_sockets($1_t)
|
|
Chris PeBenito |
0c73cd |
|
|
Chris PeBenito |
c9428d |
init_read_script_pid($1_t)
|
|
Chris PeBenito |
0c73cd |
# The library functions always try to open read-write first,
|
|
Chris PeBenito |
0c73cd |
# then fall back to read-only if it fails.
|
|
Chris PeBenito |
c9428d |
init_dontaudit_write_script_pid($1_t)
|
|
Chris PeBenito |
0c73cd |
# Stop warnings about access to /dev/console
|
|
Chris PeBenito |
c9428d |
init_dontaudit_use_fd($1_t)
|
|
Chris PeBenito |
c9428d |
init_dontaudit_use_script_fd($1_t)
|
|
Chris PeBenito |
0c73cd |
|
|
Chris PeBenito |
0c73cd |
miscfiles_read_man_pages($1_t)
|
|
Chris PeBenito |
0c73cd |
|
|
Chris PeBenito |
5e0da6 |
seutil_read_config($1_t)
|
|
Chris PeBenito |
0c73cd |
# Allow users to execute checkpolicy without a domain transition
|
|
Chris PeBenito |
0c73cd |
# so it can be used without privilege to write real binary policy file
|
|
Chris PeBenito |
5e0da6 |
seutil_exec_checkpol($1_t)
|
|
Chris PeBenito |
0c73cd |
|
|
Chris PeBenito |
a1fcff |
ifdef(`enable_polyinstantiation',`
|
|
Chris PeBenito |
a1fcff |
type_member $1_t $1_home_dir_t:dir $1_home_t;
|
|
Chris PeBenito |
a1fcff |
files_poly_member_tmp($1_t)
|
|
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 |
0c73cd |
# 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 |
0fd9dc |
corenet_tcp_bind_generic_port($1_t)
|
|
Chris PeBenito |
34c8fa |
')
|
|
Chris PeBenito |
0c73cd |
|
|
Chris PeBenito |
132880 |
optional_policy(`kerberos',`
|
|
Chris PeBenito |
a7a979 |
kerberos_use($1_t)
|
|
Chris PeBenito |
a7a979 |
')
|
|
Chris PeBenito |
a7a979 |
|
|
Chris PeBenito |
132880 |
optional_policy(`loadkeys',`
|
|
Chris PeBenito |
21468a |
loadkeys_run($1_t,$1_r,$1_tty_device_t)
|
|
Chris PeBenito |
21468a |
')
|
|
Chris PeBenito |
21468a |
|
|
Chris PeBenito |
0c73cd |
# for running depmod as part of the kernel packaging process
|
|
Chris PeBenito |
132880 |
optional_policy(`modutils',`
|
|
Chris PeBenito |
c9428d |
modutils_read_module_conf($1_t)
|
|
Chris PeBenito |
0c73cd |
')
|
|
Chris PeBenito |
0c73cd |
|
|
Chris PeBenito |
132880 |
optional_policy(`netutils',`
|
|
Chris PeBenito |
1f91e1 |
netutils_run_ping_cond($1_t,$1_r,{ $1_tty_device_t $1_devpts_t })
|
|
Chris PeBenito |
1f91e1 |
netutils_run_traceroute_cond($1_t,$1_r,{ $1_tty_device_t $1_devpts_t })
|
|
Chris PeBenito |
1f91e1 |
')
|
|
Chris PeBenito |
1f91e1 |
|
|
Chris PeBenito |
e08118 |
# Run pppd in pppd_t by default for user
|
|
Chris PeBenito |
132880 |
optional_policy(`ppp', `
|
|
Chris PeBenito |
e08118 |
ppp_run_cond($1_t,$1_r,{ $1_tty_device_t $1_devpts_t })
|
|
Chris PeBenito |
e08118 |
')
|
|
Chris PeBenito |
e08118 |
|
|
Chris PeBenito |
132880 |
optional_policy(`selinuxutil',`
|
|
Chris PeBenito |
0c73cd |
# for when the network connection is killed
|
|
Chris PeBenito |
8fd367 |
seutil_dontaudit_signal_newrole($1_t)
|
|
Chris PeBenito |
0c73cd |
')
|
|
Chris PeBenito |
0c73cd |
|
|
Chris PeBenito |
0c73cd |
# Need the following rule to allow users to run vpnc
|
|
Chris PeBenito |
132880 |
optional_policy(`xserver', `
|
|
Chris PeBenito |
12ae75 |
corenet_tcp_bind_xserver_port($1_t)
|
|
Chris PeBenito |
0c73cd |
')
|
|
Chris PeBenito |
0c73cd |
|
|
Chris PeBenito |
0c73cd |
ifdef(`TODO',`
|
|
Chris PeBenito |
0c73cd |
|
|
Chris PeBenito |
a1fcff |
ifdef(`enable_mls',`',`
|
|
Chris PeBenito |
a1fcff |
fs_exec_noxattr($1_t)
|
|
Chris PeBenito |
a1fcff |
tunable_policy(`user_rw_noexattrfile',`
|
|
Chris PeBenito |
a1fcff |
create_dir_file($1_t, noexattrfile)
|
|
Chris PeBenito |
a1fcff |
# Write floppies
|
|
Chris PeBenito |
a1fcff |
storage_raw_read_removable_device($1_t)
|
|
Chris PeBenito |
a1fcff |
storage_raw_write_removable_device($1_t)
|
|
Chris PeBenito |
a1fcff |
# cjp: what does this have to do with removable devices?
|
|
Chris PeBenito |
a1fcff |
allow $1_t usbtty_device_t:chr_file write;
|
|
Chris PeBenito |
a1fcff |
',`
|
|
Chris PeBenito |
a1fcff |
r_dir_file($1_t, noexattrfile)
|
|
Chris PeBenito |
a1fcff |
r_dir_file($1_t, removable_t)
|
|
Chris PeBenito |
a1fcff |
allow $1_t removable_device_t:blk_file r_file_perms;
|
|
Chris PeBenito |
a1fcff |
')
|
|
Chris PeBenito |
a1fcff |
')
|
|
Chris PeBenito |
a1fcff |
|
|
Chris PeBenito |
0c73cd |
dontaudit $1_t boot_t:lnk_file read;
|
|
Chris PeBenito |
0c73cd |
dontaudit $1_t boot_t:file read;
|
|
Chris PeBenito |
0c73cd |
|
|
Chris PeBenito |
0c73cd |
# do not audit read on disk devices
|
|
Chris PeBenito |
0c73cd |
dontaudit $1_t { removable_device_t fixed_disk_device_t }:blk_file read;
|
|
Chris PeBenito |
0c73cd |
|
|
Chris PeBenito |
0c73cd |
ifdef(`xdm.te', `
|
|
Chris PeBenito |
0c73cd |
allow xdm_t $1_home_t:lnk_file read;
|
|
Chris PeBenito |
0c73cd |
allow xdm_t $1_home_t:dir search;
|
|
Chris PeBenito |
0c73cd |
#
|
|
Chris PeBenito |
0c73cd |
# Changing this to dontaudit should cause the .xsession-errors file to be written to /tmp
|
|
Chris PeBenito |
0c73cd |
#
|
|
Chris PeBenito |
0c73cd |
dontaudit xdm_t $1_home_t:file rw_file_perms;
|
|
Chris PeBenito |
0c73cd |
')
|
|
Chris PeBenito |
0c73cd |
|
|
Chris PeBenito |
0c73cd |
ifdef(`ftpd.te', `
|
|
Chris PeBenito |
3eed10 |
tunable_policy(`ftp_home_dir',`
|
|
Chris PeBenito |
0c73cd |
file_type_auto_trans(ftpd_t, $1_home_dir_t, $1_home_t)
|
|
Chris PeBenito |
3eed10 |
')
|
|
Chris PeBenito |
0c73cd |
')
|
|
Chris PeBenito |
0c73cd |
|
|
Chris PeBenito |
a1fcff |
ifdef(`useradd.te', `
|
|
Chris PeBenito |
a1fcff |
# Useradd relabels /etc/skel files so needs these privs
|
|
Chris PeBenito |
a1fcff |
allow useradd_t $1_file_type:dir create_dir_perms;
|
|
Chris PeBenito |
a1fcff |
allow useradd_t $1_file_type:notdevfile_class_set create_file_perms;
|
|
Chris PeBenito |
a1fcff |
')
|
|
Chris PeBenito |
a1fcff |
|
|
Chris PeBenito |
0c73cd |
# Stat lost+found.
|
|
Chris PeBenito |
0c73cd |
allow $1_t lost_found_t:dir getattr;
|
|
Chris PeBenito |
0c73cd |
|
|
Chris PeBenito |
0c73cd |
# Read /var, /var/spool, /var/run.
|
|
Chris PeBenito |
a1fcff |
r_dir_file($1_t, var_t)
|
|
Chris PeBenito |
a1fcff |
# what about pipes and sockets under /var/spool?
|
|
Chris PeBenito |
a1fcff |
r_dir_file($1_t, var_spool_t)
|
|
Chris PeBenito |
a1fcff |
r_dir_file($1_t, var_run_t)
|
|
Chris PeBenito |
0c73cd |
allow $1_t var_lib_t:dir r_dir_perms;
|
|
Chris PeBenito |
0c73cd |
allow $1_t var_lib_t:file { getattr read };
|
|
Chris PeBenito |
0c73cd |
|
|
Chris PeBenito |
0c73cd |
# Allow users to rw usb devices
|
|
Chris PeBenito |
3eed10 |
tunable_policy(`user_rw_usb',`
|
|
Chris PeBenito |
0c73cd |
rw_dir_create_file($1_t,usbdevfs_t)
|
|
Chris PeBenito |
3eed10 |
',`
|
|
Chris PeBenito |
0c73cd |
r_dir_file($1_t,usbdevfs_t)
|
|
Chris PeBenito |
3eed10 |
')
|
|
Chris PeBenito |
0c73cd |
|
|
Chris PeBenito |
0c73cd |
# Do not audit write denials to /etc/ld.so.cache.
|
|
Chris PeBenito |
0c73cd |
dontaudit $1_t ld_so_cache_t:file write;
|
|
Chris PeBenito |
0c73cd |
|
|
Chris PeBenito |
0c73cd |
dontaudit $1_t sysadm_home_t:file { read append };
|
|
Chris PeBenito |
0c73cd |
|
|
Chris PeBenito |
0c73cd |
ifdef(`syslogd.te', `
|
|
Chris PeBenito |
0c73cd |
# Some programs that are left in $1_t will try to connect
|
|
Chris PeBenito |
0c73cd |
# to syslogd, but we do not want to let them generate log messages.
|
|
Chris PeBenito |
0c73cd |
# Do not audit.
|
|
Chris PeBenito |
0c73cd |
dontaudit $1_t devlog_t:sock_file { read write };
|
|
Chris PeBenito |
0c73cd |
dontaudit $1_t syslogd_t:unix_dgram_socket sendto;
|
|
Chris PeBenito |
0c73cd |
')
|
|
Chris PeBenito |
0c73cd |
|
|
Chris PeBenito |
0c73cd |
allow $1_t initrc_t:fifo_file write;
|
|
Chris PeBenito |
0c73cd |
|
|
Chris PeBenito |
0c73cd |
') dnl end TODO
|
|
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 |
## Set SELinux enforcement mode (enforcing/permissive)
|
|
Chris PeBenito |
8fd367 |
## Set SELinux booleans
|
|
Chris PeBenito |
8fd367 |
## Relabel all files but shadow
|
|
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 |
8fd367 |
## The prefix of the user domain (e.g., sysadm
|
|
Chris PeBenito |
8fd367 |
## is the prefix for sysadm_t).
|
|
Chris PeBenito |
8fd367 |
## </param>
|
|
Chris PeBenito |
4d8ddf |
#
|
|
Chris PeBenito |
8fd367 |
template(`admin_user_template',`
|
|
Chris PeBenito |
142e9f |
gen_require(`
|
|
Chris PeBenito |
142e9f |
class passwd { passwd chfn chsh rootok crontab };
|
|
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 |
8fd367 |
base_user_template($1)
|
|
Chris PeBenito |
0c73cd |
|
|
Chris PeBenito |
0f707d |
typeattribute $1_t privhome;
|
|
Chris PeBenito |
8bd678 |
domain_obj_id_change_exempt($1_t)
|
|
Chris PeBenito |
0c73cd |
role system_r types $1_t;
|
|
Chris PeBenito |
0c73cd |
|
|
Chris PeBenito |
142e9f |
ifdef(`direct_sysadm_daemon',`
|
|
Chris PeBenito |
142e9f |
domain_system_change_exempt($1_t)
|
|
Chris PeBenito |
142e9f |
')
|
|
Chris PeBenito |
142e9f |
|
|
Chris PeBenito |
0c73cd |
typeattribute $1_devpts_t admin_terminal;
|
|
Chris PeBenito |
0c73cd |
|
|
Chris PeBenito |
0c73cd |
typeattribute $1_tty_device_t admin_terminal;
|
|
Chris PeBenito |
0c73cd |
|
|
Chris PeBenito |
0c73cd |
##############################
|
|
Chris PeBenito |
0c73cd |
#
|
|
Chris PeBenito |
0c73cd |
# $1_t local policy
|
|
Chris PeBenito |
0c73cd |
#
|
|
Chris PeBenito |
0c73cd |
|
|
Chris PeBenito |
0c73cd |
allow $1_t self:capability ~sys_module;
|
|
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 |
0c73cd |
# Manipulate other users crontab.
|
|
Chris PeBenito |
0c73cd |
allow $1_t self:passwd crontab;
|
|
Chris PeBenito |
0c73cd |
|
|
Chris PeBenito |
0c73cd |
# for the administrator to run TCP servers directly
|
|
Chris PeBenito |
0c73cd |
allow $1_t self:tcp_socket { acceptfrom connectto recvfrom };
|
|
Chris PeBenito |
0c73cd |
|
|
Chris PeBenito |
a1fcff |
allow $1_t self:netlink_audit_socket nlmsg_readpriv;
|
|
Chris PeBenito |
a1fcff |
|
|
Chris PeBenito |
0c73cd |
allow $1_t $1_devpts_t:chr_file { setattr ioctl read getattr lock write append };
|
|
Chris PeBenito |
0fd9dc |
term_create_pty($1_t,$1_devpts_t)
|
|
Chris PeBenito |
0c73cd |
|
|
Chris PeBenito |
0c73cd |
kernel_read_system_state($1_t)
|
|
Chris PeBenito |
0c73cd |
kernel_read_network_state($1_t)
|
|
Chris PeBenito |
0c73cd |
kernel_read_software_raid_state($1_t)
|
|
Chris PeBenito |
0fd9dc |
kernel_getattr_core($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 |
0fd9dc |
kernel_rw_all_sysctl($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 |
# for the administrator to run TCP servers directly
|
|
Chris PeBenito |
2ec4c9 |
kernel_tcp_recvfrom($1_t)
|
|
Chris PeBenito |
2ec4c9 |
|
|
Chris PeBenito |
2ec4c9 |
corenet_tcp_bind_generic_port($1_t)
|
|
Chris PeBenito |
2ec4c9 |
# allow setting up tunnels
|
|
Chris PeBenito |
2ec4c9 |
corenet_use_tun_tap_device($1_t)
|
|
Chris PeBenito |
2ec4c9 |
|
|
Chris PeBenito |
2ec4c9 |
dev_getattr_generic_blk_file($1_t)
|
|
Chris PeBenito |
2ec4c9 |
dev_getattr_generic_chr_file($1_t)
|
|
Chris PeBenito |
2ec4c9 |
dev_getattr_all_blk_files($1_t)
|
|
Chris PeBenito |
2ec4c9 |
dev_getattr_all_chr_files($1_t)
|
|
Chris PeBenito |
2ec4c9 |
|
|
Chris PeBenito |
2ec4c9 |
fs_getattr_all_fs($1_t)
|
|
Chris PeBenito |
2ec4c9 |
fs_set_all_quotas($1_t)
|
|
Chris PeBenito |
a1fcff |
fs_exec_noxattr($1_t)
|
|
Chris PeBenito |
8fd367 |
|
|
Chris PeBenito |
5e0da6 |
selinux_set_enforce_mode($1_t)
|
|
Chris PeBenito |
5e0da6 |
selinux_set_boolean($1_t)
|
|
Chris PeBenito |
5e0da6 |
selinux_set_parameters($1_t)
|
|
Chris PeBenito |
0c73cd |
# Get security policy decisions:
|
|
Chris PeBenito |
5e0da6 |
selinux_get_fs_mount($1_t)
|
|
Chris PeBenito |
5e0da6 |
selinux_validate_context($1_t)
|
|
Chris PeBenito |
5e0da6 |
selinux_compute_access_vector($1_t)
|
|
Chris PeBenito |
5e0da6 |
selinux_compute_create_context($1_t)
|
|
Chris PeBenito |
5e0da6 |
selinux_compute_relabel_context($1_t)
|
|
Chris PeBenito |
5e0da6 |
selinux_compute_user_contexts($1_t)
|
|
Chris PeBenito |
0c73cd |
|
|
Chris PeBenito |
0c73cd |
storage_raw_read_removable_device($1_t)
|
|
Chris PeBenito |
0c73cd |
storage_raw_write_removable_device($1_t)
|
|
Chris PeBenito |
0c73cd |
|
|
Chris PeBenito |
0fd9dc |
term_use_console($1_t)
|
|
Chris PeBenito |
0fd9dc |
term_use_unallocated_tty($1_t)
|
|
Chris PeBenito |
0fd9dc |
term_use_all_user_ptys($1_t)
|
|
Chris PeBenito |
0fd9dc |
term_use_all_user_ttys($1_t)
|
|
Chris PeBenito |
0c73cd |
|
|
Chris PeBenito |
2ec4c9 |
auth_getattr_shadow($1_t)
|
|
Chris PeBenito |
0c73cd |
# Manage almost all files
|
|
Chris PeBenito |
c9428d |
auth_manage_all_files_except_shadow($1_t)
|
|
Chris PeBenito |
0c73cd |
# Relabel almost all files
|
|
Chris PeBenito |
c9428d |
auth_relabel_all_files_except_shadow($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 |
c9428d |
init_use_initctl($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 |
5e0da6 |
seutil_read_config($1_t)
|
|
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 |
5e0da6 |
seutil_manage_src_pol($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 |
5e0da6 |
seutil_manage_binary_pol($1_t)
|
|
Chris PeBenito |
0c73cd |
|
|
Chris PeBenito |
132880 |
optional_policy(`cron',`
|
|
Chris PeBenito |
1504ff |
cron_admin_template($1,$1_t,$1_r)
|
|
Chris PeBenito |
1504ff |
')
|
|
Chris PeBenito |
1504ff |
|
|
Chris PeBenito |
1504ff |
optional_policy(`mta',`
|
|
Chris PeBenito |
1504ff |
mta_admin_template($1,$1_t,$1_r)
|
|
Chris PeBenito |
0c73cd |
')
|
|
Chris PeBenito |
0c73cd |
|
|
Chris PeBenito |
0c73cd |
ifdef(`TODO',`
|
|
Chris PeBenito |
0c73cd |
|
|
Chris PeBenito |
0c73cd |
# for lsof
|
|
Chris PeBenito |
0c73cd |
allow $1_t mtrr_device_t:file getattr;
|
|
Chris PeBenito |
2ec4c9 |
allow $1_t eventpollfs_t:file getattr;
|
|
Chris PeBenito |
0c73cd |
|
|
Chris PeBenito |
2ec4c9 |
allow $1_t serial_device:chr_file setattr;
|
|
Chris PeBenito |
0c73cd |
|
|
Chris PeBenito |
0c73cd |
allow $1_t ptyfile:chr_file getattr;
|
|
Chris PeBenito |
0c73cd |
|
|
Chris PeBenito |
0c73cd |
# Run admin programs that require different permissions in their own domain.
|
|
Chris PeBenito |
0c73cd |
# These rules were moved into the appropriate program domain file.
|
|
Chris PeBenito |
0c73cd |
|
|
Chris PeBenito |
2ec4c9 |
ifdef(`xserver.te', `
|
|
Chris PeBenito |
2ec4c9 |
# Create files in /tmp/.X11-unix with our X servers derived
|
|
Chris PeBenito |
2ec4c9 |
# tmp type rather than user_xserver_tmp_t.
|
|
Chris PeBenito |
2ec4c9 |
file_type_auto_trans($1_xserver_t, xserver_tmpfile, $1_xserver_tmp_t, sock_file)
|
|
Chris PeBenito |
0c73cd |
')
|
|
Chris PeBenito |
0c73cd |
|
|
Chris PeBenito |
2ec4c9 |
|
|
Chris PeBenito |
0c73cd |
ifdef(`xdm.te', `
|
|
Chris PeBenito |
2ec4c9 |
tunable_policy(`xdm_sysadm_login',`
|
|
Chris PeBenito |
2ec4c9 |
allow xdm_t $1_home_t:lnk_file read;
|
|
Chris PeBenito |
2ec4c9 |
allow xdm_t $1_home_t:dir search;
|
|
Chris PeBenito |
0c73cd |
')
|
|
Chris PeBenito |
a1fcff |
can_pipe_xdm($1_t)
|
|
Chris PeBenito |
0c73cd |
')
|
|
Chris PeBenito |
0c73cd |
|
|
Chris PeBenito |
2ec4c9 |
# Connect data port to ftpd.
|
|
Chris PeBenito |
2ec4c9 |
ifdef(`ftpd.te', `can_tcp_connect(ftpd_t, $1_t)')
|
|
Chris PeBenito |
2ec4c9 |
|
|
Chris PeBenito |
2ec4c9 |
# Connect second port to rshd.
|
|
Chris PeBenito |
2ec4c9 |
ifdef(`rshd.te', `can_tcp_connect(rshd_t, $1_t)')
|
|
Chris PeBenito |
2ec4c9 |
|
|
Chris PeBenito |
2ec4c9 |
# Allow MAKEDEV to work
|
|
Chris PeBenito |
2ec4c9 |
allow $1_t device_t:dir rw_dir_perms;
|
|
Chris PeBenito |
2ec4c9 |
allow $1_t device_type:{ blk_file chr_file } { create unlink rename };
|
|
Chris PeBenito |
2ec4c9 |
allow $1_t device_t:lnk_file { create read };
|
|
Chris PeBenito |
2ec4c9 |
|
|
Chris PeBenito |
0c73cd |
#
|
|
Chris PeBenito |
0c73cd |
# A user who is authorized for sysadm_t may nonetheless have
|
|
Chris PeBenito |
0c73cd |
# a home directory labeled with user_home_t if the user is expected
|
|
Chris PeBenito |
0c73cd |
# to login in either user_t or sysadm_t. Hence, the derived domains
|
|
Chris PeBenito |
0c73cd |
# for programs need to be able to access user_home_t.
|
|
Chris PeBenito |
0c73cd |
#
|
|
Chris PeBenito |
4d8ddf |
|
|
Chris PeBenito |
0c73cd |
# Allow our gph domain to write to .xsession-errors.
|
|
Chris PeBenito |
0c73cd |
ifdef(`gnome-pty-helper.te', `
|
|
Chris PeBenito |
0c73cd |
allow $1_gph_t user_home_dir_type:dir rw_dir_perms;
|
|
Chris PeBenito |
0c73cd |
allow $1_gph_t user_home_type:file create_file_perms;
|
|
Chris PeBenito |
0c73cd |
')
|
|
Chris PeBenito |
4d8ddf |
|
|
Chris PeBenito |
2ec4c9 |
# Run programs from staff home directories.
|
|
Chris PeBenito |
2ec4c9 |
# Not ideal, but typical if users want to login as both sysadm_t or staff_t.
|
|
Chris PeBenito |
2ec4c9 |
can_exec($1_t, staff_home_t)
|
|
Chris PeBenito |
a1fcff |
|
|
Chris PeBenito |
a1fcff |
tunable_policy(`user_rw_noexattrfile',`
|
|
Chris PeBenito |
a1fcff |
create_dir_file($1_t, noexattrfile)
|
|
Chris PeBenito |
a1fcff |
# Write floppies
|
|
Chris PeBenito |
a1fcff |
storage_raw_read_removable_device($1_t)
|
|
Chris PeBenito |
a1fcff |
storage_raw_write_removable_device($1_t)
|
|
Chris PeBenito |
a1fcff |
# cjp: what does this have to do with removable devices?
|
|
Chris PeBenito |
a1fcff |
allow $1_t usbtty_device_t:chr_file write;
|
|
Chris PeBenito |
a1fcff |
',`
|
|
Chris PeBenito |
a1fcff |
r_dir_file($1_t, noexattrfile)
|
|
Chris PeBenito |
a1fcff |
r_dir_file($1_t, removable_t)
|
|
Chris PeBenito |
a1fcff |
allow $1_t removable_device_t:blk_file r_file_perms;
|
|
Chris PeBenito |
a1fcff |
')
|
|
Chris PeBenito |
a1fcff |
allow $1 removable_t:filesystem getattr;
|
|
Chris PeBenito |
a1fcff |
|
|
Chris PeBenito |
0c73cd |
') dnl endif TODO
|
|
Chris PeBenito |
4d8ddf |
')
|
|
Chris PeBenito |
490639 |
|
|
Chris PeBenito |
daa0e0 |
########################################
|
|
Chris PeBenito |
ab940a |
## <summary>
|
|
Chris PeBenito |
6820a3 |
## Make the specified type usable in a
|
|
Chris PeBenito |
6820a3 |
## user home directory.
|
|
Chris PeBenito |
6820a3 |
## </summary>
|
|
Chris PeBenito |
6820a3 |
## <desc>
|
|
Chris PeBenito |
6820a3 |
##
|
|
Chris PeBenito |
6820a3 |
## Make the specified type usable in a
|
|
Chris PeBenito |
6820a3 |
## user home directory.
|
|
Chris PeBenito |
6820a3 |
##
|
|
Chris PeBenito |
6820a3 |
##
|
|
Chris PeBenito |
6820a3 |
## This is a templated interface, and should only
|
|
Chris PeBenito |
6820a3 |
## be called from a per-userdomain template.
|
|
Chris PeBenito |
6820a3 |
##
|
|
Chris PeBenito |
6820a3 |
## </desc>
|
|
Chris PeBenito |
6820a3 |
## <param name="userdomain_prefix">
|
|
Chris PeBenito |
6820a3 |
## The prefix of the user domain (e.g., user
|
|
Chris PeBenito |
6820a3 |
## is the prefix for user_t).
|
|
Chris PeBenito |
6820a3 |
## </param>
|
|
Chris PeBenito |
6820a3 |
## <param name="type">
|
|
Chris PeBenito |
6820a3 |
## Type to be used as a file in the
|
|
Chris PeBenito |
6820a3 |
## user home directory.
|
|
Chris PeBenito |
6820a3 |
## </param>
|
|
Chris PeBenito |
6820a3 |
#
|
|
Chris PeBenito |
6820a3 |
template(`userdom_home_file',`
|
|
Chris PeBenito |
6820a3 |
gen_require(`
|
|
Chris PeBenito |
6820a3 |
type $1_file_type;
|
|
Chris PeBenito |
6820a3 |
')
|
|
Chris PeBenito |
6820a3 |
|
|
Chris PeBenito |
6820a3 |
typeattribute $2 $1_file_type;
|
|
Chris PeBenito |
6820a3 |
files_type($2)
|
|
Chris PeBenito |
6820a3 |
')
|
|
Chris PeBenito |
6820a3 |
|
|
Chris PeBenito |
6820a3 |
########################################
|
|
Chris PeBenito |
6820a3 |
## <summary>
|
|
Chris PeBenito |
a996bd |
## Search user home directories.
|
|
Chris PeBenito |
a996bd |
## </summary>
|
|
Chris PeBenito |
a996bd |
## <desc>
|
|
Chris PeBenito |
a996bd |
##
|
|
Chris PeBenito |
a996bd |
## Search user home directories.
|
|
Chris PeBenito |
a996bd |
##
|
|
Chris PeBenito |
a996bd |
##
|
|
Chris PeBenito |
a996bd |
## This is a templated interface, and should only
|
|
Chris PeBenito |
a996bd |
## be called from a per-userdomain template.
|
|
Chris PeBenito |
a996bd |
##
|
|
Chris PeBenito |
a996bd |
## </desc>
|
|
Chris PeBenito |
a996bd |
## <param name="userdomain_prefix">
|
|
Chris PeBenito |
a996bd |
## The prefix of the user domain (e.g., user
|
|
Chris PeBenito |
a996bd |
## is the prefix for user_t).
|
|
Chris PeBenito |
a996bd |
## </param>
|
|
Chris PeBenito |
a996bd |
## <param name="domain">
|
|
Chris PeBenito |
725926 |
## Domain allowed access.
|
|
Chris PeBenito |
a996bd |
## </param>
|
|
Chris PeBenito |
a996bd |
#
|
|
Chris PeBenito |
a996bd |
template(`userdom_search_user_home',`
|
|
Chris PeBenito |
a996bd |
gen_require(`
|
|
Chris PeBenito |
90c3dd |
type $1_home_dir_t;
|
|
Chris PeBenito |
a996bd |
')
|
|
Chris PeBenito |
a996bd |
|
|
Chris PeBenito |
a996bd |
files_search_home($2)
|
|
Chris PeBenito |
a996bd |
allow $2 $1_home_dir_t:dir { getattr search };
|
|
Chris PeBenito |
a996bd |
')
|
|
Chris PeBenito |
a996bd |
|
|
Chris PeBenito |
a996bd |
########################################
|
|
Chris PeBenito |
a996bd |
## <summary>
|
|
Chris PeBenito |
88dd38 |
## Create, read, write, and delete symbolic links
|
|
Chris PeBenito |
88dd38 |
## in a user home subdirectory.
|
|
Chris PeBenito |
88dd38 |
## </summary>
|
|
Chris PeBenito |
88dd38 |
## <desc>
|
|
Chris PeBenito |
88dd38 |
##
|
|
Chris PeBenito |
88dd38 |
## Create, read, write, and delete symbolic links
|
|
Chris PeBenito |
88dd38 |
## in a user home subdirectory.
|
|
Chris PeBenito |
88dd38 |
##
|
|
Chris PeBenito |
88dd38 |
##
|
|
Chris PeBenito |
88dd38 |
## This is a templated interface, and should only
|
|
Chris PeBenito |
88dd38 |
## be called from a per-userdomain template.
|
|
Chris PeBenito |
88dd38 |
##
|
|
Chris PeBenito |
88dd38 |
## </desc>
|
|
Chris PeBenito |
88dd38 |
## <param name="userdomain_prefix">
|
|
Chris PeBenito |
88dd38 |
## The prefix of the user domain (e.g., user
|
|
Chris PeBenito |
88dd38 |
## is the prefix for user_t).
|
|
Chris PeBenito |
88dd38 |
## </param>
|
|
Chris PeBenito |
88dd38 |
## <param name="domain">
|
|
Chris PeBenito |
725926 |
## Domain allowed access.
|
|
Chris PeBenito |
88dd38 |
## </param>
|
|
Chris PeBenito |
88dd38 |
#
|
|
Chris PeBenito |
88dd38 |
template(`userdom_manage_user_home_subdirs',`
|
|
Chris PeBenito |
88dd38 |
gen_require(`
|
|
Chris PeBenito |
88dd38 |
type $1_home_dir_t, $1_home_t;
|
|
Chris PeBenito |
88dd38 |
')
|
|
Chris PeBenito |
88dd38 |
|
|
Chris PeBenito |
88dd38 |
files_search_home($2)
|
|
Chris PeBenito |
88dd38 |
allow $2 $1_home_dir_t:dir rw_dir_perms;
|
|
Chris PeBenito |
88dd38 |
allow $2 $1_home_t:dir manage_dir_perms;
|
|
Chris PeBenito |
88dd38 |
')
|
|
Chris PeBenito |
88dd38 |
|
|
Chris PeBenito |
88dd38 |
########################################
|
|
Chris PeBenito |
88dd38 |
## <summary>
|
|
Chris PeBenito |
451c1e |
## Read user home files.
|
|
Chris PeBenito |
2a9456 |
## </summary>
|
|
Chris PeBenito |
2a9456 |
## <desc>
|
|
Chris PeBenito |
2a9456 |
##
|
|
Chris PeBenito |
451c1e |
## Read user home files.
|
|
Chris PeBenito |
2a9456 |
##
|
|
Chris PeBenito |
2a9456 |
##
|
|
Chris PeBenito |
2a9456 |
## This is a templated interface, and should only
|
|
Chris PeBenito |
2a9456 |
## be called from a per-userdomain template.
|
|
Chris PeBenito |
2a9456 |
##
|
|
Chris PeBenito |
2a9456 |
## </desc>
|
|
Chris PeBenito |
451c1e |
## <param name="userdomain_prefix">
|
|
Chris PeBenito |
451c1e |
## The prefix of the user domain (e.g., user
|
|
Chris PeBenito |
451c1e |
## is the prefix for user_t).
|
|
Chris PeBenito |
451c1e |
## </param>
|
|
Chris PeBenito |
2a9456 |
## <param name="domain">
|
|
Chris PeBenito |
725926 |
## Domain allowed access.
|
|
Chris PeBenito |
2a9456 |
## </param>
|
|
Chris PeBenito |
451c1e |
#
|
|
Chris PeBenito |
451c1e |
template(`userdom_read_user_home_files',`
|
|
Chris PeBenito |
451c1e |
gen_require(`
|
|
Chris PeBenito |
90c3dd |
type $1_home_dir_t, $1_home_t;
|
|
Chris PeBenito |
451c1e |
')
|
|
Chris PeBenito |
451c1e |
|
|
Chris PeBenito |
451c1e |
files_search_home($2)
|
|
Chris PeBenito |
451c1e |
allow $2 $1_home_dir_t:dir search;
|
|
Chris PeBenito |
451c1e |
allow $2 $1_home_t:dir search;
|
|
Chris PeBenito |
451c1e |
allow $2 $1_home_t:file r_file_perms;
|
|
Chris PeBenito |
451c1e |
')
|
|
Chris PeBenito |
451c1e |
|
|
Chris PeBenito |
451c1e |
########################################
|
|
Chris PeBenito |
451c1e |
## <summary>
|
|
Chris PeBenito |
451c1e |
## Execute user home files.
|
|
Chris PeBenito |
451c1e |
## </summary>
|
|
Chris PeBenito |
451c1e |
## <desc>
|
|
Chris PeBenito |
451c1e |
##
|
|
Chris PeBenito |
451c1e |
## Execute user home files.
|
|
Chris PeBenito |
451c1e |
##
|
|
Chris PeBenito |
451c1e |
##
|
|
Chris PeBenito |
451c1e |
## This is a templated interface, and should only
|
|
Chris PeBenito |
451c1e |
## be called from a per-userdomain template.
|
|
Chris PeBenito |
451c1e |
##
|
|
Chris PeBenito |
451c1e |
## </desc>
|
|
Chris PeBenito |
2a9456 |
## <param name="userdomain_prefix">
|
|
Chris PeBenito |
2a9456 |
## The prefix of the user domain (e.g., user
|
|
Chris PeBenito |
2a9456 |
## is the prefix for user_t).
|
|
Chris PeBenito |
2a9456 |
## </param>
|
|
Chris PeBenito |
451c1e |
## <param name="domain">
|
|
Chris PeBenito |
725926 |
## Domain allowed access.
|
|
Chris PeBenito |
451c1e |
## </param>
|
|
Chris PeBenito |
2a9456 |
#
|
|
Chris PeBenito |
2a9456 |
template(`userdom_exec_user_home_files',`
|
|
Chris PeBenito |
2a9456 |
gen_require(`
|
|
Chris PeBenito |
90c3dd |
type $1_home_dir_t, $1_home_t;
|
|
Chris PeBenito |
2a9456 |
')
|
|
Chris PeBenito |
2a9456 |
|
|
Chris PeBenito |
451c1e |
files_search_home($2)
|
|
Chris PeBenito |
451c1e |
allow $2 $1_home_dir_t:dir search;
|
|
Chris PeBenito |
451c1e |
allow $2 $1_home_t:dir search;
|
|
Chris PeBenito |
451c1e |
can_exec($2,$1_home_t)
|
|
Chris PeBenito |
2a9456 |
')
|
|
Chris PeBenito |
2a9456 |
|
|
Chris PeBenito |
2a9456 |
########################################
|
|
Chris PeBenito |
2a9456 |
## <summary>
|
|
Chris PeBenito |
2a9456 |
## Create, read, write, and delete files
|
|
Chris PeBenito |
2a9456 |
## in a user home subdirectory.
|
|
Chris PeBenito |
2a9456 |
## </summary>
|
|
Chris PeBenito |
2a9456 |
## <desc>
|
|
Chris PeBenito |
2a9456 |
##
|
|
Chris PeBenito |
2a9456 |
## Create, read, write, and delete files
|
|
Chris PeBenito |
2a9456 |
## in a user home subdirectory.
|
|
Chris PeBenito |
2a9456 |
##
|
|
Chris PeBenito |
2a9456 |
##
|
|
Chris PeBenito |
2a9456 |
## This is a templated interface, and should only
|
|
Chris PeBenito |
2a9456 |
## be called from a per-userdomain template.
|
|
Chris PeBenito |
2a9456 |
##
|
|
Chris PeBenito |
2a9456 |
## </desc>
|
|
Chris PeBenito |
2a9456 |
## <param name="userdomain_prefix">
|
|
Chris PeBenito |
2a9456 |
## The prefix of the user domain (e.g., user
|
|
Chris PeBenito |
2a9456 |
## is the prefix for user_t).
|
|
Chris PeBenito |
2a9456 |
## </param>
|
|
Chris PeBenito |
451c1e |
## <param name="domain">
|
|
Chris PeBenito |
725926 |
## Domain allowed access.
|
|
Chris PeBenito |
451c1e |
## </param>
|
|
Chris PeBenito |
2a9456 |
#
|
|
Chris PeBenito |
2a9456 |
template(`userdom_manage_user_home_subdir_files',`
|
|
Chris PeBenito |
2a9456 |
gen_require(`
|
|
Chris PeBenito |
90c3dd |
type $1_home_dir_t, $1_home_t;
|
|
Chris PeBenito |
2a9456 |
')
|
|
Chris PeBenito |
2a9456 |
|
|
Chris PeBenito |
451c1e |
files_search_home($2)
|
|
Chris PeBenito |
451c1e |
allow $2 $1_home_dir_t:dir search;
|
|
Chris PeBenito |
451c1e |
allow $2 $1_home_t:dir rw_dir_perms;
|
|
Chris PeBenito |
451c1e |
allow $2 $1_home_t:file create_file_perms;
|
|
Chris PeBenito |
2a9456 |
')
|
|
Chris PeBenito |
2a9456 |
|
|
Chris PeBenito |
2a9456 |
########################################
|
|
Chris PeBenito |
2a9456 |
## <summary>
|
|
Chris PeBenito |
2a9456 |
## Create, read, write, and delete symbolic links
|
|
Chris PeBenito |
2a9456 |
## in a user home subdirectory.
|
|
Chris PeBenito |
2a9456 |
## </summary>
|
|
Chris PeBenito |
2a9456 |
## <desc>
|
|
Chris PeBenito |
2a9456 |
##
|
|
Chris PeBenito |
2a9456 |
## Create, read, write, and delete symbolic links
|
|
Chris PeBenito |
2a9456 |
## in a user home subdirectory.
|
|
Chris PeBenito |
2a9456 |
##
|
|
Chris PeBenito |
2a9456 |
##
|
|
Chris PeBenito |
2a9456 |
## This is a templated interface, and should only
|
|
Chris PeBenito |
2a9456 |
## be called from a per-userdomain template.
|
|
Chris PeBenito |
2a9456 |
##
|
|
Chris PeBenito |
2a9456 |
## </desc>
|
|
Chris PeBenito |
2a9456 |
## <param name="userdomain_prefix">
|
|
Chris PeBenito |
2a9456 |
## The prefix of the user domain (e.g., user
|
|
Chris PeBenito |
2a9456 |
## is the prefix for user_t).
|
|
Chris PeBenito |
2a9456 |
## </param>
|
|
Chris PeBenito |
451c1e |
## <param name="domain">
|
|
Chris PeBenito |
725926 |
## Domain allowed access.
|
|
Chris PeBenito |
451c1e |
## </param>
|
|
Chris PeBenito |
2a9456 |
#
|
|
Chris PeBenito |
2a9456 |
template(`userdom_manage_user_home_subdir_symlinks',`
|
|
Chris PeBenito |
2a9456 |
gen_require(`
|
|
Chris PeBenito |
90c3dd |
type $1_home_dir_t, $1_home_t;
|
|
Chris PeBenito |
2a9456 |
')
|
|
Chris PeBenito |
2a9456 |
|
|
Chris PeBenito |
451c1e |
files_search_home($2)
|
|
Chris PeBenito |
451c1e |
allow $2 $1_home_dir_t:dir search;
|
|
Chris PeBenito |
451c1e |
allow $2 $1_home_t:dir rw_dir_perms;
|
|
Chris PeBenito |
451c1e |
allow $2 $1_home_t:lnk_file create_lnk_perms;
|
|
Chris PeBenito |
2a9456 |
')
|
|
Chris PeBenito |
2a9456 |
|
|
Chris PeBenito |
2a9456 |
########################################
|
|
Chris PeBenito |
2a9456 |
## <summary>
|
|
Chris PeBenito |
84c922 |
## Create, read, write, and delete named pipes
|
|
Chris PeBenito |
84c922 |
## in a user home subdirectory.
|
|
Chris PeBenito |
84c922 |
## </summary>
|
|
Chris PeBenito |
84c922 |
## <desc>
|
|
Chris PeBenito |
84c922 |
##
|
|
Chris PeBenito |
84c922 |
## Create, read, write, and delete named pipes
|
|
Chris PeBenito |
84c922 |
## in a user home subdirectory.
|
|
Chris PeBenito |
84c922 |
##
|
|
Chris PeBenito |
84c922 |
##
|
|
Chris PeBenito |
84c922 |
## This is a templated interface, and should only
|
|
Chris PeBenito |
84c922 |
## be called from a per-userdomain template.
|
|
Chris PeBenito |
84c922 |
##
|
|
Chris PeBenito |
84c922 |
## </desc>
|
|
Chris PeBenito |
84c922 |
## <param name="userdomain_prefix">
|
|
Chris PeBenito |
84c922 |
## The prefix of the user domain (e.g., user
|
|
Chris PeBenito |
84c922 |
## is the prefix for user_t).
|
|
Chris PeBenito |
84c922 |
## </param>
|
|
Chris PeBenito |
84c922 |
## <param name="domain">
|
|
Chris PeBenito |
725926 |
## Domain allowed access.
|
|
Chris PeBenito |
84c922 |
## </param>
|
|
Chris PeBenito |
84c922 |
#
|
|
Chris PeBenito |
84c922 |
template(`userdom_manage_user_home_subdir_pipes',`
|
|
Chris PeBenito |
84c922 |
gen_require(`
|
|
Chris PeBenito |
90c3dd |
type $1_home_dir_t, $1_home_t;
|
|
Chris PeBenito |
84c922 |
')
|
|
Chris PeBenito |
84c922 |
|
|
Chris PeBenito |
84c922 |
files_search_home($2)
|
|
Chris PeBenito |
84c922 |
allow $2 $1_home_dir_t:dir search;
|
|
Chris PeBenito |
84c922 |
allow $2 $1_home_t:dir rw_dir_perms;
|
|
Chris PeBenito |
84c922 |
allow $2 $1_home_t:fifo_file create_file_perms;
|
|
Chris PeBenito |
84c922 |
')
|
|
Chris PeBenito |
84c922 |
|
|
Chris PeBenito |
84c922 |
########################################
|
|
Chris PeBenito |
84c922 |
## <summary>
|
|
Chris PeBenito |
84c922 |
## Create, read, write, and delete named sockets
|
|
Chris PeBenito |
84c922 |
## in a user home subdirectory.
|
|
Chris PeBenito |
84c922 |
## </summary>
|
|
Chris PeBenito |
84c922 |
## <desc>
|
|
Chris PeBenito |
84c922 |
##
|
|
Chris PeBenito |
84c922 |
## Create, read, write, and delete named sockets
|
|
Chris PeBenito |
84c922 |
## in a user home subdirectory.
|
|
Chris PeBenito |
84c922 |
##
|
|
Chris PeBenito |
84c922 |
##
|
|
Chris PeBenito |
84c922 |
## This is a templated interface, and should only
|
|
Chris PeBenito |
84c922 |
## be called from a per-userdomain template.
|
|
Chris PeBenito |
84c922 |
##
|
|
Chris PeBenito |
84c922 |
## </desc>
|
|
Chris PeBenito |
84c922 |
## <param name="userdomain_prefix">
|
|
Chris PeBenito |
84c922 |
## The prefix of the user domain (e.g., user
|
|
Chris PeBenito |
84c922 |
## is the prefix for user_t).
|
|
Chris PeBenito |
84c922 |
## </param>
|
|
Chris PeBenito |
84c922 |
## <param name="domain">
|
|
Chris PeBenito |
725926 |
## Domain allowed access.
|
|
Chris PeBenito |
84c922 |
## </param>
|
|
Chris PeBenito |
84c922 |
#
|
|
Chris PeBenito |
84c922 |
template(`userdom_manage_user_home_subdir_sockets',`
|
|
Chris PeBenito |
84c922 |
gen_require(`
|
|
Chris PeBenito |
90c3dd |
type $1_home_dir_t, $1_home_t;
|
|
Chris PeBenito |
84c922 |
')
|
|
Chris PeBenito |
84c922 |
|
|
Chris PeBenito |
84c922 |
files_search_home($2)
|
|
Chris PeBenito |
84c922 |
allow $2 $1_home_dir_t:dir search;
|
|
Chris PeBenito |
84c922 |
allow $2 $1_home_t:dir rw_dir_perms;
|
|
Chris PeBenito |
84c922 |
allow $2 $1_home_t:sock_file create_file_perms;
|
|
Chris PeBenito |
84c922 |
')
|
|
Chris PeBenito |
84c922 |
|
|
Chris PeBenito |
84c922 |
########################################
|
|
Chris PeBenito |
84c922 |
## <summary>
|
|
Chris PeBenito |
84c922 |
##
|
|
Chris PeBenito |
84c922 |
## </summary>
|
|
Chris PeBenito |
84c922 |
## <desc>
|
|
Chris PeBenito |
84c922 |
##
|
|
Chris PeBenito |
84c922 |
## Create, read, write, and delete named sockets
|
|
Chris PeBenito |
84c922 |
## in a user home subdirectory.
|
|
Chris PeBenito |
84c922 |
##
|
|
Chris PeBenito |
84c922 |
##
|
|
Chris PeBenito |
84c922 |
## This is a templated interface, and should only
|
|
Chris PeBenito |
84c922 |
## be called from a per-userdomain template.
|
|
Chris PeBenito |
84c922 |
##
|
|
Chris PeBenito |
84c922 |
## </desc>
|
|
Chris PeBenito |
84c922 |
## <param name="userdomain_prefix">
|
|
Chris PeBenito |
84c922 |
## The prefix of the user domain (e.g., user
|
|
Chris PeBenito |
84c922 |
## is the prefix for user_t).
|
|
Chris PeBenito |
84c922 |
## </param>
|
|
Chris PeBenito |
84c922 |
## <param name="domain">
|
|
Chris PeBenito |
725926 |
## Domain allowed access.
|
|
Chris PeBenito |
84c922 |
## </param>
|
|
Chris PeBenito |
84c922 |
## <param name="object_class" optional="true">
|
|
Chris PeBenito |
84c922 |
## The class of the object to be created. If not
|
|
Chris PeBenito |
84c922 |
## specified, file is used.
|
|
Chris PeBenito |
84c922 |
## </param>
|
|
Chris PeBenito |
6820a3 |
## <param name="private_type" optional="true">
|
|
Chris PeBenito |
6820a3 |
## The type of the object to create. If this is
|
|
Chris PeBenito |
6820a3 |
## not specified, the regular home directory
|
|
Chris PeBenito |
6820a3 |
## type is used.
|
|
Chris PeBenito |
6820a3 |
## </param>
|
|
Chris PeBenito |
84c922 |
#
|
|
Chris PeBenito |
84c922 |
template(`userdom_create_user_home',`
|
|
Chris PeBenito |
84c922 |
gen_require(`
|
|
Chris PeBenito |
90c3dd |
type $1_home_dir_t, $1_home_t;
|
|
Chris PeBenito |
84c922 |
')
|
|
Chris PeBenito |
84c922 |
|
|
Chris PeBenito |
84c922 |
files_search_home($2)
|
|
Chris PeBenito |
84c922 |
|
|
Chris PeBenito |
84c922 |
allow $2 $1_home_dir_t:dir rw_dir_perms;
|
|
Chris PeBenito |
84c922 |
|
|
Chris PeBenito |
6820a3 |
ifelse(`$4',`',`
|
|
Chris PeBenito |
6820a3 |
ifelse(`$3',`',`
|
|
Chris PeBenito |
6820a3 |
type_transition $2 $1_home_dir_t:file $1_home_t;
|
|
Chris PeBenito |
6820a3 |
',`
|
|
Chris PeBenito |
6820a3 |
type_transition $2 $1_home_dir_t:$3 $1_home_t;
|
|
Chris PeBenito |
6820a3 |
')
|
|
Chris PeBenito |
84c922 |
',`
|
|
Chris PeBenito |
6820a3 |
ifelse(`$3',`',`
|
|
Chris PeBenito |
6820a3 |
type_transition $2 $1_home_dir_t:file $4;
|
|
Chris PeBenito |
6820a3 |
',`
|
|
Chris PeBenito |
6820a3 |
type_transition $2 $1_home_dir_t:$3 $4;
|
|
Chris PeBenito |
6820a3 |
')
|
|
Chris PeBenito |
84c922 |
')
|
|
Chris PeBenito |
84c922 |
')
|
|
Chris PeBenito |
84c922 |
|
|
Chris PeBenito |
84c922 |
########################################
|
|
Chris PeBenito |
84c922 |
## <summary>
|
|
Chris PeBenito |
2a9456 |
## Create, read, write, and delete user
|
|
Chris PeBenito |
2a9456 |
## temporary directories.
|
|
Chris PeBenito |
2a9456 |
## </summary>
|
|
Chris PeBenito |
2a9456 |
## <desc>
|
|
Chris PeBenito |
2a9456 |
##
|
|
Chris PeBenito |
2a9456 |
## Create, read, write, and delete user
|
|
Chris PeBenito |
2a9456 |
## temporary directories.
|
|
Chris PeBenito |
2a9456 |
##
|
|
Chris PeBenito |
2a9456 |
##
|
|
Chris PeBenito |
2a9456 |
## This is a templated interface, and should only
|
|
Chris PeBenito |
2a9456 |
## be called from a per-userdomain template.
|
|
Chris PeBenito |
2a9456 |
##
|
|
Chris PeBenito |
2a9456 |
## </desc>
|
|
Chris PeBenito |
2a9456 |
## <param name="userdomain_prefix">
|
|
Chris PeBenito |
2a9456 |
## The prefix of the user domain (e.g., user
|
|
Chris PeBenito |
2a9456 |
## is the prefix for user_t).
|
|
Chris PeBenito |
2a9456 |
## </param>
|
|
Chris PeBenito |
451c1e |
## <param name="domain">
|
|
Chris PeBenito |
725926 |
## Domain allowed access.
|
|
Chris PeBenito |
451c1e |
## </param>
|
|
Chris PeBenito |
2a9456 |
#
|
|
Chris PeBenito |
2a9456 |
template(`userdom_manage_user_tmp_dirs',`
|
|
Chris PeBenito |
2a9456 |
gen_require(`
|
|
Chris PeBenito |
90c3dd |
type $1_tmp_t;
|
|
Chris PeBenito |
2a9456 |
')
|
|
Chris PeBenito |
2a9456 |
|
|
Chris PeBenito |
451c1e |
files_search_tmp($2)
|
|
Chris PeBenito |
451c1e |
allow $2 $1_tmp_t:dir create_dir_perms;
|
|
Chris PeBenito |
2a9456 |
')
|
|
Chris PeBenito |
2a9456 |
|
|
Chris PeBenito |
2a9456 |
########################################
|
|
Chris PeBenito |
2a9456 |
## <summary>
|
|
Chris PeBenito |
2a9456 |
## Create, read, write, and delete user
|
|
Chris PeBenito |
2a9456 |
## temporary files.
|
|
Chris PeBenito |
2a9456 |
## </summary>
|
|
Chris PeBenito |
2a9456 |
## <desc>
|
|
Chris PeBenito |
2a9456 |
##
|
|
Chris PeBenito |
2a9456 |
## Create, read, write, and delete user
|
|
Chris PeBenito |
2a9456 |
## temporary files.
|
|
Chris PeBenito |
2a9456 |
##
|
|
Chris PeBenito |
2a9456 |
##
|
|
Chris PeBenito |
2a9456 |
## This is a templated interface, and should only
|
|
Chris PeBenito |
2a9456 |
## be called from a per-userdomain template.
|
|
Chris PeBenito |
2a9456 |
##
|
|
Chris PeBenito |
2a9456 |
## </desc>
|
|
Chris PeBenito |
2a9456 |
## <param name="userdomain_prefix">
|
|
Chris PeBenito |
2a9456 |
## The prefix of the user domain (e.g., user
|
|
Chris PeBenito |
2a9456 |
## is the prefix for user_t).
|
|
Chris PeBenito |
2a9456 |
## </param>
|
|
Chris PeBenito |
451c1e |
## <param name="domain">
|
|
Chris PeBenito |
725926 |
## Domain allowed access.
|
|
Chris PeBenito |
451c1e |
## </param>
|
|
Chris PeBenito |
2a9456 |
#
|
|
Chris PeBenito |
2a9456 |
template(`userdom_manage_user_tmp_files',`
|
|
Chris PeBenito |
2a9456 |
gen_require(`
|
|
Chris PeBenito |
90c3dd |
type $1_tmp_t;
|
|
Chris PeBenito |
2a9456 |
')
|
|
Chris PeBenito |
2a9456 |
|
|
Chris PeBenito |
451c1e |
files_search_tmp($2)
|
|
Chris PeBenito |
451c1e |
allow $2 $1_tmp_t:dir rw_dir_perms;
|
|
Chris PeBenito |
451c1e |
allow $2 $1_tmp_t:file create_file_perms;
|
|
Chris PeBenito |
2a9456 |
')
|
|
Chris PeBenito |
2a9456 |
|
|
Chris PeBenito |
2a9456 |
########################################
|
|
Chris PeBenito |
2a9456 |
## <summary>
|
|
Chris PeBenito |
2a9456 |
## Create, read, write, and delete user
|
|
Chris PeBenito |
2a9456 |
## temporary symbolic links.
|
|
Chris PeBenito |
2a9456 |
## </summary>
|
|
Chris PeBenito |
2a9456 |
## <desc>
|
|
Chris PeBenito |
2a9456 |
##
|
|
Chris PeBenito |
2a9456 |
## Create, read, write, and delete user
|
|
Chris PeBenito |
2a9456 |
## temporary symbolic links.
|
|
Chris PeBenito |
2a9456 |
##
|
|
Chris PeBenito |
2a9456 |
##
|
|
Chris PeBenito |
2a9456 |
## This is a templated interface, and should only
|
|
Chris PeBenito |
2a9456 |
## be called from a per-userdomain template.
|
|
Chris PeBenito |
2a9456 |
##
|
|
Chris PeBenito |
2a9456 |
## </desc>
|
|
Chris PeBenito |
2a9456 |
## <param name="userdomain_prefix">
|
|
Chris PeBenito |
2a9456 |
## The prefix of the user domain (e.g., user
|
|
Chris PeBenito |
2a9456 |
## is the prefix for user_t).
|
|
Chris PeBenito |
2a9456 |
## </param>
|
|
Chris PeBenito |
451c1e |
## <param name="domain">
|
|
Chris PeBenito |
725926 |
## Domain allowed access.
|
|
Chris PeBenito |
451c1e |
## </param>
|
|
Chris PeBenito |
2a9456 |
#
|
|
Chris PeBenito |
2a9456 |
template(`userdom_manage_user_tmp_symlinks',`
|
|
Chris PeBenito |
2a9456 |
gen_require(`
|
|
Chris PeBenito |
90c3dd |
type $1_tmp_t;
|
|
Chris PeBenito |
2a9456 |
')
|
|
Chris PeBenito |
2a9456 |
|
|
Chris PeBenito |
451c1e |
files_search_tmp($2)
|
|
Chris PeBenito |
451c1e |
allow $2 $1_tmp_t:dir rw_dir_perms;
|
|
Chris PeBenito |
451c1e |
allow $2 $1_tmp_t:lnk_file create_lnk_perms;
|
|
Chris PeBenito |
2a9456 |
')
|
|
Chris PeBenito |
2a9456 |
|
|
Chris PeBenito |
2a9456 |
########################################
|
|
Chris PeBenito |
2a9456 |
## <summary>
|
|
Chris PeBenito |
2a9456 |
## Create, read, write, and delete user
|
|
Chris PeBenito |
2a9456 |
## temporary named pipes.
|
|
Chris PeBenito |
2a9456 |
## </summary>
|
|
Chris PeBenito |
2a9456 |
## <desc>
|
|
Chris PeBenito |
2a9456 |
##
|
|
Chris PeBenito |
2a9456 |
## Create, read, write, and delete user
|
|
Chris PeBenito |
2a9456 |
## temporary named pipes.
|
|
Chris PeBenito |
2a9456 |
##
|
|
Chris PeBenito |
2a9456 |
##
|
|
Chris PeBenito |
2a9456 |
## This is a templated interface, and should only
|
|
Chris PeBenito |
2a9456 |
## be called from a per-userdomain template.
|
|
Chris PeBenito |
2a9456 |
##
|
|
Chris PeBenito |
2a9456 |
## </desc>
|
|
Chris PeBenito |
2a9456 |
## <param name="userdomain_prefix">
|
|
Chris PeBenito |
2a9456 |
## The prefix of the user domain (e.g., user
|
|
Chris PeBenito |
2a9456 |
## is the prefix for user_t).
|
|
Chris PeBenito |
2a9456 |
## </param>
|
|
Chris PeBenito |
451c1e |
## <param name="domain">
|
|
Chris PeBenito |
725926 |
## Domain allowed access.
|
|
Chris PeBenito |
451c1e |
## </param>
|
|
Chris PeBenito |
2a9456 |
#
|
|
Chris PeBenito |
2a9456 |
template(`userdom_manage_user_tmp_pipes',`
|
|
Chris PeBenito |
2a9456 |
gen_require(`
|
|
Chris PeBenito |
90c3dd |
type $1_tmp_t;
|
|
Chris PeBenito |
2a9456 |
')
|
|
Chris PeBenito |
2a9456 |
|
|
Chris PeBenito |
451c1e |
files_search_tmp($2)
|
|
Chris PeBenito |
451c1e |
allow $2 $1_tmp_t:dir rw_dir_perms;
|
|
Chris PeBenito |
451c1e |
allow $2 $1_tmp_t:fifo_file create_file_perms;
|
|
Chris PeBenito |
2a9456 |
')
|
|
Chris PeBenito |
2a9456 |
|
|
Chris PeBenito |
2a9456 |
########################################
|
|
Chris PeBenito |
2a9456 |
## <summary>
|
|
Chris PeBenito |
2a9456 |
## Create, read, write, and delete user
|
|
Chris PeBenito |
2a9456 |
## temporary named sockets.
|
|
Chris PeBenito |
2a9456 |
## </summary>
|
|
Chris PeBenito |
2a9456 |
## <desc>
|
|
Chris PeBenito |
2a9456 |
##
|
|
Chris PeBenito |
2a9456 |
## Create, read, write, and delete user
|
|
Chris PeBenito |
2a9456 |
## temporary named sockets.
|
|
Chris PeBenito |
2a9456 |
##
|
|
Chris PeBenito |
2a9456 |
##
|
|
Chris PeBenito |
2a9456 |
## This is a templated interface, and should only
|
|
Chris PeBenito |
2a9456 |
## be called from a per-userdomain template.
|
|
Chris PeBenito |
2a9456 |
##
|
|
Chris PeBenito |
2a9456 |
## </desc>
|
|
Chris PeBenito |
2a9456 |
## <param name="userdomain_prefix">
|
|
Chris PeBenito |
2a9456 |
## The prefix of the user domain (e.g., user
|
|
Chris PeBenito |
2a9456 |
## is the prefix for user_t).
|
|
Chris PeBenito |
2a9456 |
## </param>
|
|
Chris PeBenito |
451c1e |
## <param name="domain">
|
|
Chris PeBenito |
725926 |
## Domain allowed access.
|
|
Chris PeBenito |
451c1e |
## </param>
|
|
Chris PeBenito |
2a9456 |
#
|
|
Chris PeBenito |
2a9456 |
template(`userdom_manage_user_tmp_sockets',`
|
|
Chris PeBenito |
2a9456 |
gen_require(`
|
|
Chris PeBenito |
90c3dd |
type $1_tmp_t;
|
|
Chris PeBenito |
2a9456 |
')
|
|
Chris PeBenito |
2a9456 |
|
|
Chris PeBenito |
451c1e |
files_search_tmp($2)
|
|
Chris PeBenito |
451c1e |
allow $2 $1_tmp_t:dir rw_dir_perms;
|
|
Chris PeBenito |
451c1e |
allow $2 $1_tmp_t:sock_file create_file_perms;
|
|
Chris PeBenito |
2a9456 |
')
|
|
Chris PeBenito |
2a9456 |
|
|
Chris PeBenito |
2a9456 |
########################################
|
|
Chris PeBenito |
2a9456 |
## <summary>
|
|
Chris PeBenito |
2a9456 |
## Read and write a user domain tty and pty.
|
|
Chris PeBenito |
2a9456 |
## </summary>
|
|
Chris PeBenito |
2a9456 |
## <desc>
|
|
Chris PeBenito |
2a9456 |
##
|
|
Chris PeBenito |
2a9456 |
## Read and write a user domain tty and pty.
|
|
Chris PeBenito |
2a9456 |
##
|
|
Chris PeBenito |
2a9456 |
##
|
|
Chris PeBenito |
2a9456 |
## This is a templated interface, and should only
|
|
Chris PeBenito |
2a9456 |
## be called from a per-userdomain template.
|
|
Chris PeBenito |
2a9456 |
##
|
|
Chris PeBenito |
2a9456 |
## </desc>
|
|
Chris PeBenito |
2a9456 |
## <param name="userdomain_prefix">
|
|
Chris PeBenito |
2a9456 |
## The prefix of the user domain (e.g., user
|
|
Chris PeBenito |
2a9456 |
## is the prefix for user_t).
|
|
Chris PeBenito |
2a9456 |
## </param>
|
|
Chris PeBenito |
451c1e |
## <param name="domain">
|
|
Chris PeBenito |
725926 |
## Domain allowed access.
|
|
Chris PeBenito |
451c1e |
## </param>
|
|
Chris PeBenito |
2a9456 |
#
|
|
Chris PeBenito |
2a9456 |
template(`userdom_use_user_terminals',`
|
|
Chris PeBenito |
1dd86c |
ifdef(`targeted_policy',`
|
|
Chris PeBenito |
1dd86c |
term_use_unallocated_tty($2)
|
|
Chris PeBenito |
1dd86c |
term_use_generic_pty($2)
|
|
Chris PeBenito |
1dd86c |
',`
|
|
Chris PeBenito |
1dd86c |
gen_require(`
|
|
Chris PeBenito |
1dd86c |
type $1_tty_device_t, $1_devpts_t;
|
|
Chris PeBenito |
1dd86c |
')
|
|
Chris PeBenito |
2a9456 |
|
|
Chris PeBenito |
1dd86c |
allow $2 $1_tty_device_t:chr_file rw_term_perms;
|
|
Chris PeBenito |
1dd86c |
allow $2 $1_devpts_t:chr_file rw_term_perms;
|
|
Chris PeBenito |
1dd86c |
term_list_ptys($2)
|
|
Chris PeBenito |
1dd86c |
')
|
|
Chris PeBenito |
2a9456 |
')
|
|
Chris PeBenito |
2a9456 |
|
|
Chris PeBenito |
2a9456 |
########################################
|
|
Chris PeBenito |
2a9456 |
## <summary>
|
|
Chris PeBenito |
414e41 |
## Execute a shell in all user domains. This
|
|
Chris PeBenito |
414e41 |
## is an explicit transition, requiring the
|
|
Chris PeBenito |
414e41 |
## caller to use setexeccon().
|
|
Chris PeBenito |
ab940a |
## </summary>
|
|
Chris PeBenito |
414e41 |
## <param name="domain">
|
|
Chris PeBenito |
725926 |
## Domain allowed access.
|
|
Chris PeBenito |
414e41 |
## </param>
|
|
Chris PeBenito |
4bf4ed |
#
|
|
Chris PeBenito |
199895 |
interface(`userdom_spec_domtrans_all_users',`
|
|
Chris PeBenito |
21871a |
gen_require(`
|
|
Chris PeBenito |
21871a |
attribute userdomain;
|
|
Chris PeBenito |
21871a |
')
|
|
Chris PeBenito |
21871a |
|
|
Chris PeBenito |
c9428d |
corecmd_shell_spec_domtrans($1,userdomain)
|
|
Chris PeBenito |
4bf4ed |
')
|
|
Chris PeBenito |
4bf4ed |
|
|
Chris PeBenito |
21871a |
########################################
|
|
Chris PeBenito |
ab940a |
## <summary>
|
|
Chris PeBenito |
414e41 |
## Execute a shell in all unprivileged user domains. This
|
|
Chris PeBenito |
414e41 |
## is an explicit transition, requiring the
|
|
Chris PeBenito |
414e41 |
## caller to use setexeccon().
|
|
Chris PeBenito |
ab940a |
## </summary>
|
|
Chris PeBenito |
414e41 |
## <param name="domain">
|
|
Chris PeBenito |
725926 |
## Domain allowed access.
|
|
Chris PeBenito |
414e41 |
## </param>
|
|
Chris PeBenito |
21871a |
#
|
|
Chris PeBenito |
199895 |
interface(`userdom_spec_domtrans_unpriv_users',`
|
|
Chris PeBenito |
21871a |
gen_require(`
|
|
Chris PeBenito |
21871a |
attribute unpriv_userdomain;
|
|
Chris PeBenito |
21871a |
')
|
|
Chris PeBenito |
21871a |
|
|
Chris PeBenito |
21871a |
corecmd_shell_spec_domtrans($1,unpriv_userdomain)
|
|
Chris PeBenito |
4bf4ed |
')
|
|
Chris PeBenito |
4bf4ed |
|
|
Chris PeBenito |
4bf4ed |
########################################
|
|
Chris PeBenito |
ab940a |
## <summary>
|
|
Chris PeBenito |
414e41 |
## Execute a shell in the sysadm domain.
|
|
Chris PeBenito |
ab940a |
## </summary>
|
|
Chris PeBenito |
414e41 |
## <param name="domain">
|
|
Chris PeBenito |
725926 |
## Domain allowed access.
|
|
Chris PeBenito |
414e41 |
## </param>
|
|
Chris PeBenito |
d490eb |
#
|
|
Chris PeBenito |
199895 |
interface(`userdom_shell_domtrans_sysadm',`
|
|
Chris PeBenito |
c98340 |
ifdef(`targeted_policy',`
|
|
Chris PeBenito |
c98340 |
#cjp: need to doublecheck this one
|
|
Chris PeBenito |
a42ca7 |
unconfined_shell_domtrans($1)
|
|
Chris PeBenito |
c98340 |
',`
|
|
Chris PeBenito |
c98340 |
gen_require(`
|
|
Chris PeBenito |
c98340 |
type sysadm_t;
|
|
Chris PeBenito |
c98340 |
')
|
|
Chris PeBenito |
0c73cd |
|
|
Chris PeBenito |
df00b2 |
corecmd_shell_domtrans($1,sysadm_t)
|
|
Chris PeBenito |
df00b2 |
|
|
Chris PeBenito |
df00b2 |
allow $1 sysadm_t:fd use;
|
|
Chris PeBenito |
df00b2 |
allow sysadm_t $1:fd use;
|
|
Chris PeBenito |
df00b2 |
allow sysadm_t $1:fifo_file rw_file_perms;
|
|
Chris PeBenito |
df00b2 |
allow sysadm_t $1:process sigchld;
|
|
Chris PeBenito |
c98340 |
')
|
|
Chris PeBenito |
d490eb |
')
|
|
Chris PeBenito |
d490eb |
|
|
Chris PeBenito |
d490eb |
########################################
|
|
Chris PeBenito |
ab940a |
## <summary>
|
|
Chris PeBenito |
ae9e27 |
## Search the staff users home directory.
|
|
Chris PeBenito |
ae9e27 |
## </summary>
|
|
Chris PeBenito |
ae9e27 |
## <param name="domain">
|
|
Chris PeBenito |
ae9e27 |
## Domain to not audit.
|
|
Chris PeBenito |
ae9e27 |
## </param>
|
|
Chris PeBenito |
ae9e27 |
#
|
|
Chris PeBenito |
ae9e27 |
interface(`userdom_search_staff_home_dir',`
|
|
Chris PeBenito |
ae9e27 |
gen_require(`
|
|
Chris PeBenito |
ae9e27 |
type staff_home_dir_t;
|
|
Chris PeBenito |
ae9e27 |
')
|
|
Chris PeBenito |
ae9e27 |
|
|
Chris PeBenito |
ae9e27 |
files_search_home($1)
|
|
Chris PeBenito |
ae9e27 |
allow $1 staff_home_dir_t:dir search;
|
|
Chris PeBenito |
ae9e27 |
')
|
|
Chris PeBenito |
ae9e27 |
|
|
Chris PeBenito |
ae9e27 |
########################################
|
|
Chris PeBenito |
ae9e27 |
## <summary>
|
|
Chris PeBenito |
ae9e27 |
## Do not audit attempts to search the staff
|
|
Chris PeBenito |
ae9e27 |
## users home directory.
|
|
Chris PeBenito |
ae9e27 |
## </summary>
|
|
Chris PeBenito |
ae9e27 |
## <param name="domain">
|
|
Chris PeBenito |
ae9e27 |
## Domain to not audit.
|
|
Chris PeBenito |
ae9e27 |
## </param>
|
|
Chris PeBenito |
ae9e27 |
#
|
|
Chris PeBenito |
ae9e27 |
interface(`userdom_dontaudit_search_staff_home_dir',`
|
|
Chris PeBenito |
ae9e27 |
gen_require(`
|
|
Chris PeBenito |
ae9e27 |
type staff_home_dir_t;
|
|
Chris PeBenito |
ae9e27 |
')
|
|
Chris PeBenito |
ae9e27 |
|
|
Chris PeBenito |
ae9e27 |
dontaudit $1 staff_home_dir_t:dir search;
|
|
Chris PeBenito |
ae9e27 |
')
|
|
Chris PeBenito |
ae9e27 |
|
|
Chris PeBenito |
ae9e27 |
########################################
|
|
Chris PeBenito |
ae9e27 |
## <summary>
|
|
Chris PeBenito |
fd89e1 |
## Read files in the staff users home directory.
|
|
Chris PeBenito |
fd89e1 |
## </summary>
|
|
Chris PeBenito |
fd89e1 |
## <param name="domain">
|
|
Chris PeBenito |
725926 |
## Domain allowed access.
|
|
Chris PeBenito |
fd89e1 |
## </param>
|
|
Chris PeBenito |
fd89e1 |
#
|
|
Chris PeBenito |
fd89e1 |
interface(`userdom_read_staff_home_files',`
|
|
Chris PeBenito |
fd89e1 |
gen_require(`
|
|
Chris PeBenito |
fd89e1 |
type staff_home_dir_t, staff_home_t;
|
|
Chris PeBenito |
fd89e1 |
')
|
|
Chris PeBenito |
fd89e1 |
|
|
Chris PeBenito |
fd89e1 |
files_search_home($1)
|
|
Chris PeBenito |
fd89e1 |
allow $1 { staff_home_dir_t staff_home_t }:dir r_dir_perms;
|
|
Chris PeBenito |
fd89e1 |
allow $1 staff_home_t:{ file lnk_file } r_file_perms;
|
|
Chris PeBenito |
fd89e1 |
')
|
|
Chris PeBenito |
fd89e1 |
|
|
Chris PeBenito |
fd89e1 |
########################################
|
|
Chris PeBenito |
fd89e1 |
## <summary>
|
|
Chris PeBenito |
1f91e1 |
## Send a SIGCHLD signal to sysadm users.
|
|
Chris PeBenito |
1f91e1 |
## </summary>
|
|
Chris PeBenito |
1f91e1 |
## <param name="domain">
|
|
Chris PeBenito |
725926 |
## Domain allowed access.
|
|
Chris PeBenito |
1f91e1 |
## </param>
|
|
Chris PeBenito |
1f91e1 |
#
|
|
Chris PeBenito |
1f91e1 |
interface(`userdom_sigchld_sysadm',`
|
|
Chris PeBenito |
af4752 |
ifdef(`targeted_policy',`
|
|
Chris PeBenito |
af4752 |
unconfined_sigchld($1)
|
|
Chris PeBenito |
af4752 |
',`
|
|
Chris PeBenito |
af4752 |
gen_require(`
|
|
Chris PeBenito |
af4752 |
type sysadm_t;
|
|
Chris PeBenito |
af4752 |
')
|
|
Chris PeBenito |
1f91e1 |
|
|
Chris PeBenito |
af4752 |
allow $1 sysadm_t:process sigchld;
|
|
Chris PeBenito |
af4752 |
')
|
|
Chris PeBenito |
1f91e1 |
')
|
|
Chris PeBenito |
1f91e1 |
|
|
Chris PeBenito |
1f91e1 |
########################################
|
|
Chris PeBenito |
1f91e1 |
## <summary>
|
|
Chris PeBenito |
725926 |
## Do not audit attepts to get the attributes
|
|
Chris PeBenito |
725926 |
## of sysadm ttys.
|
|
Chris PeBenito |
725926 |
## </summary>
|
|
Chris PeBenito |
725926 |
## <param name="domain">
|
|
Chris PeBenito |
725926 |
## Domain allowed access.
|
|
Chris PeBenito |
725926 |
## </param>
|
|
Chris PeBenito |
725926 |
#
|
|
Chris PeBenito |
725926 |
interface(`userdom_dontaudit_getattr_sysadm_tty',`
|
|
Chris PeBenito |
725926 |
ifdef(`targeted_policy',`
|
|
Chris PeBenito |
725926 |
term_dontaudit_getattr_unallocated_ttys($1)
|
|
Chris PeBenito |
725926 |
',`
|
|
Chris PeBenito |
725926 |
gen_require(`
|
|
Chris PeBenito |
725926 |
type sysadm_tty_device_t;
|
|
Chris PeBenito |
725926 |
')
|
|
Chris PeBenito |
725926 |
|
|
Chris PeBenito |
725926 |
dontaudit $1 sysadm_tty_device_t:chr_file getattr;
|
|
Chris PeBenito |
725926 |
')
|
|
Chris PeBenito |
725926 |
')
|
|
Chris PeBenito |
725926 |
|
|
Chris PeBenito |
725926 |
########################################
|
|
Chris PeBenito |
725926 |
## <summary>
|
|
Chris PeBenito |
414e41 |
## Read and write sysadm ttys.
|
|
Chris PeBenito |
ab940a |
## </summary>
|
|
Chris PeBenito |
414e41 |
## <param name="domain">
|
|
Chris PeBenito |
725926 |
## Domain allowed access.
|
|
Chris PeBenito |
414e41 |
## </param>
|
|
Chris PeBenito |
490639 |
#
|
|
Chris PeBenito |
199895 |
interface(`userdom_use_sysadm_tty',`
|
|
Chris PeBenito |
c98340 |
ifdef(`targeted_policy',`
|
|
Chris PeBenito |
c98340 |
term_use_unallocated_tty($1)
|
|
Chris PeBenito |
c98340 |
',`
|
|
Chris PeBenito |
c98340 |
gen_require(`
|
|
Chris PeBenito |
c98340 |
type sysadm_tty_device_t;
|
|
Chris PeBenito |
c98340 |
')
|
|
Chris PeBenito |
fd89e1 |
|
|
Chris PeBenito |
c98340 |
dev_list_all_dev_nodes($1)
|
|
Chris PeBenito |
c98340 |
term_list_ptys($1)
|
|
Chris PeBenito |
c98340 |
allow $1 sysadm_tty_device_t:chr_file rw_term_perms;
|
|
Chris PeBenito |
c98340 |
')
|
|
Chris PeBenito |
fd89e1 |
')
|
|
Chris PeBenito |
fd89e1 |
|
|
Chris PeBenito |
fd89e1 |
########################################
|
|
Chris PeBenito |
fd89e1 |
## <summary>
|
|
Chris PeBenito |
50aca6 |
## Do not audit attempts to use sysadm ttys.
|
|
Chris PeBenito |
50aca6 |
## </summary>
|
|
Chris PeBenito |
50aca6 |
## <param name="domain">
|
|
Chris PeBenito |
50aca6 |
## Domain to not audit.
|
|
Chris PeBenito |
50aca6 |
## </param>
|
|
Chris PeBenito |
50aca6 |
#
|
|
Chris PeBenito |
50aca6 |
interface(`userdom_dontaudit_use_sysadm_tty',`
|
|
Chris PeBenito |
50aca6 |
ifdef(`targeted_policy',`
|
|
Chris PeBenito |
50aca6 |
term_dontaudit_use_unallocated_tty($1)
|
|
Chris PeBenito |
50aca6 |
',`
|
|
Chris PeBenito |
50aca6 |
gen_require(`
|
|
Chris PeBenito |
98a8ea |
type sysadm_tty_device_t;
|
|
Chris PeBenito |
50aca6 |
')
|
|
Chris PeBenito |
50aca6 |
|
|
Chris PeBenito |
50aca6 |
dontaudit $1 sysadm_tty_device_t:chr_file { read write };
|
|
Chris PeBenito |
50aca6 |
')
|
|
Chris PeBenito |
50aca6 |
')
|
|
Chris PeBenito |
50aca6 |
|
|
Chris PeBenito |
50aca6 |
########################################
|
|
Chris PeBenito |
50aca6 |
## <summary>
|
|
Chris PeBenito |
fd89e1 |
## Read and write sysadm ptys.
|
|
Chris PeBenito |
fd89e1 |
## </summary>
|
|
Chris PeBenito |
fd89e1 |
## <param name="domain">
|
|
Chris PeBenito |
725926 |
## Domain allowed access.
|
|
Chris PeBenito |
fd89e1 |
## </param>
|
|
Chris PeBenito |
fd89e1 |
#
|
|
Chris PeBenito |
fd89e1 |
interface(`userdom_use_sysadm_pty',`
|
|
Chris PeBenito |
c98340 |
ifdef(`targeted_policy',`
|
|
Chris PeBenito |
c98340 |
term_use_generic_pty($1)
|
|
Chris PeBenito |
c98340 |
',`
|
|
Chris PeBenito |
c98340 |
gen_require(`
|
|
Chris PeBenito |
c98340 |
type sysadm_devpts_t;
|
|
Chris PeBenito |
c98340 |
')
|
|
Chris PeBenito |
0c73cd |
|
|
Chris PeBenito |
c98340 |
dev_list_all_dev_nodes($1)
|
|
Chris PeBenito |
c98340 |
term_list_ptys($1)
|
|
Chris PeBenito |
c98340 |
allow $1 sysadm_devpts_t:chr_file rw_term_perms;
|
|
Chris PeBenito |
c98340 |
')
|
|
Chris PeBenito |
daa0e0 |
')
|
|
Chris PeBenito |
daa0e0 |
|
|
Chris PeBenito |
0404a3 |
########################################
|
|
Chris PeBenito |
ab940a |
## <summary>
|
|
Chris PeBenito |
d4dca5 |
## Dont audit attempts to read and write sysadm ptys.
|
|
Chris PeBenito |
d4dca5 |
## </summary>
|
|
Chris PeBenito |
d4dca5 |
## <param name="domain">
|
|
Chris PeBenito |
d4dca5 |
## Domain to not audit.
|
|
Chris PeBenito |
d4dca5 |
## </param>
|
|
Chris PeBenito |
d4dca5 |
#
|
|
Chris PeBenito |
d4dca5 |
interface(`userdom_dontaudit_use_sysadm_pty',`
|
|
Chris PeBenito |
d4dca5 |
ifdef(`targeted_policy',`
|
|
Chris PeBenito |
d4dca5 |
term_dontaudit_use_generic_pty($1)
|
|
Chris PeBenito |
d4dca5 |
',`
|
|
Chris PeBenito |
d4dca5 |
gen_require(`
|
|
Chris PeBenito |
d4dca5 |
type sysadm_devpts_t;
|
|
Chris PeBenito |
d4dca5 |
')
|
|
Chris PeBenito |
d4dca5 |
|
|
Chris PeBenito |
d4dca5 |
dontaudit $1 sysadm_devpts_t:chr_file { read write };
|
|
Chris PeBenito |
d4dca5 |
')
|
|
Chris PeBenito |
d4dca5 |
')
|
|
Chris PeBenito |
d4dca5 |
|
|
Chris PeBenito |
d4dca5 |
########################################
|
|
Chris PeBenito |
d4dca5 |
## <summary>
|
|
Chris PeBenito |
414e41 |
## Read and write sysadm ttys and ptys.
|
|
Chris PeBenito |
ab940a |
## </summary>
|
|
Chris PeBenito |
414e41 |
## <param name="domain">
|
|
Chris PeBenito |
725926 |
## Domain allowed access.
|
|
Chris PeBenito |
414e41 |
## </param>
|
|
Chris PeBenito |
0404a3 |
#
|
|
Chris PeBenito |
199895 |
interface(`userdom_use_sysadm_terms',`
|
|
Chris PeBenito |
c98340 |
userdom_use_sysadm_tty($1)
|
|
Chris PeBenito |
c98340 |
userdom_use_sysadm_pty($1)
|
|
Chris PeBenito |
daa0e0 |
')
|
|
Chris PeBenito |
daa0e0 |
|
|
Chris PeBenito |
daa0e0 |
########################################
|
|
Chris PeBenito |
ab940a |
## <summary>
|
|
Chris PeBenito |
50aca6 |
## Do not audit attempts to use sysadm ttys and ptys.
|
|
Chris PeBenito |
ab940a |
## </summary>
|
|
Chris PeBenito |
414e41 |
## <param name="domain">
|
|
Chris PeBenito |
50aca6 |
## Domain to not audit.
|
|
Chris PeBenito |
414e41 |
## </param>
|
|
Chris PeBenito |
763c44 |
#
|
|
Chris PeBenito |
199895 |
interface(`userdom_dontaudit_use_sysadm_terms',`
|
|
Chris PeBenito |
c98340 |
ifdef(`targeted_policy',`
|
|
Chris PeBenito |
c98340 |
term_dontaudit_use_generic_pty($1)
|
|
Chris PeBenito |
c98340 |
',`
|
|
Chris PeBenito |
c98340 |
gen_require(`
|
|
Chris PeBenito |
c98340 |
attribute admin_terminal;
|
|
Chris PeBenito |
c98340 |
')
|
|
Chris PeBenito |
763c44 |
|
|
Chris PeBenito |
c98340 |
dontaudit $1 admin_terminal:chr_file { read write };
|
|
Chris PeBenito |
c98340 |
')
|
|
Chris PeBenito |
763c44 |
')
|
|
Chris PeBenito |
763c44 |
|
|
Chris PeBenito |
763c44 |
########################################
|
|
Chris PeBenito |
ab940a |
## <summary>
|
|
Chris PeBenito |
fd89e1 |
## Inherit and use sysadm file descriptors
|
|
Chris PeBenito |
fd89e1 |
## </summary>
|
|
Chris PeBenito |
fd89e1 |
## <param name="domain">
|
|
Chris PeBenito |
725926 |
## Domain allowed access.
|
|
Chris PeBenito |
fd89e1 |
## </param>
|
|
Chris PeBenito |
fd89e1 |
#
|
|
Chris PeBenito |
fd89e1 |
interface(`userdom_use_sysadm_fd',`
|
|
Chris PeBenito |
c98340 |
ifdef(`targeted_policy',`
|
|
Chris PeBenito |
c98340 |
#cjp: need to doublecheck this one
|
|
Chris PeBenito |
c98340 |
unconfined_use_fd($1)
|
|
Chris PeBenito |
c98340 |
',`
|
|
Chris PeBenito |
c98340 |
gen_require(`
|
|
Chris PeBenito |
c98340 |
type sysadm_t;
|
|
Chris PeBenito |
c98340 |
')
|
|
Chris PeBenito |
fd89e1 |
|
|
Chris PeBenito |
c98340 |
allow $1 sysadm_t:fd use;
|
|
Chris PeBenito |
c98340 |
')
|
|
Chris PeBenito |
fd89e1 |
')
|
|
Chris PeBenito |
fd89e1 |
|
|
Chris PeBenito |
fd89e1 |
########################################
|
|
Chris PeBenito |
fd89e1 |
## <summary>
|
|
Chris PeBenito |
fd89e1 |
## Read and write sysadm user unnamed pipes.
|
|
Chris PeBenito |
fd89e1 |
## </summary>
|
|
Chris PeBenito |
fd89e1 |
## <param name="domain">
|
|
Chris PeBenito |
725926 |
## Domain allowed access.
|
|
Chris PeBenito |
fd89e1 |
## </param>
|
|
Chris PeBenito |
fd89e1 |
#
|
|
Chris PeBenito |
fd89e1 |
interface(`userdom_rw_sysadm_pipe',`
|
|
Chris PeBenito |
c98340 |
ifdef(`targeted_policy',`
|
|
Chris PeBenito |
c98340 |
#cjp: need to doublecheck this one
|
|
Chris PeBenito |
c98340 |
unconfined_rw_pipe($1)
|
|
Chris PeBenito |
c98340 |
',`
|
|
Chris PeBenito |
c98340 |
gen_require(`
|
|
Chris PeBenito |
c98340 |
type sysadm_t;
|
|
Chris PeBenito |
c98340 |
')
|
|
Chris PeBenito |
fd89e1 |
|
|
Chris PeBenito |
c98340 |
allow $1 sysadm_t:fifo_file rw_file_perms;
|
|
Chris PeBenito |
c98340 |
')
|
|
Chris PeBenito |
fd89e1 |
')
|
|
Chris PeBenito |
fd89e1 |
|
|
Chris PeBenito |
fd89e1 |
########################################
|
|
Chris PeBenito |
fd89e1 |
## <summary>
|
|
Chris PeBenito |
799a0b |
## Get the attributes of the sysadm users
|
|
Chris PeBenito |
799a0b |
## home directory.
|
|
Chris PeBenito |
799a0b |
## </summary>
|
|
Chris PeBenito |
799a0b |
## <param name="domain">
|
|
Chris PeBenito |
44fc06 |
## Domain allowed access.
|
|
Chris PeBenito |
799a0b |
## </param>
|
|
Chris PeBenito |
799a0b |
#
|
|
Chris PeBenito |
799a0b |
interface(`userdom_getattr_sysadm_home_dir',`
|
|
Chris PeBenito |
799a0b |
gen_require(`
|
|
Chris PeBenito |
799a0b |
type sysadm_home_dir_t;
|
|
Chris PeBenito |
799a0b |
')
|
|
Chris PeBenito |
799a0b |
|
|
Chris PeBenito |
799a0b |
allow $1 sysadm_home_dir_t:dir getattr;
|
|
Chris PeBenito |
799a0b |
')
|
|
Chris PeBenito |
799a0b |
|
|
Chris PeBenito |
799a0b |
########################################
|
|
Chris PeBenito |
799a0b |
## <summary>
|
|
Chris PeBenito |
44fc06 |
## Do not audit attempts to get the
|
|
Chris PeBenito |
44fc06 |
## attributes of the sysadm users
|
|
Chris PeBenito |
44fc06 |
## home directory.
|
|
Chris PeBenito |
44fc06 |
## </summary>
|
|
Chris PeBenito |
44fc06 |
## <param name="domain">
|
|
Chris PeBenito |
44fc06 |
## Domain to not audit.
|
|
Chris PeBenito |
44fc06 |
## </param>
|
|
Chris PeBenito |
44fc06 |
#
|
|
Chris PeBenito |
44fc06 |
interface(`userdom_dontaudit_getattr_sysadm_home_dir',`
|
|
Chris PeBenito |
44fc06 |
gen_require(`
|
|
Chris PeBenito |
44fc06 |
type sysadm_home_dir_t;
|
|
Chris PeBenito |
44fc06 |
')
|
|
Chris PeBenito |
44fc06 |
|
|
Chris PeBenito |
44fc06 |
dontaudit $1 sysadm_home_dir_t:dir getattr;
|
|
Chris PeBenito |
44fc06 |
')
|
|
Chris PeBenito |
44fc06 |
|
|
Chris PeBenito |
44fc06 |
########################################
|
|
Chris PeBenito |
44fc06 |
## <summary>
|
|
Chris PeBenito |
ae9e27 |
## Search the sysadm users home directory.
|
|
Chris PeBenito |
ae9e27 |
## </summary>
|
|
Chris PeBenito |
ae9e27 |
## <param name="domain">
|
|
Chris PeBenito |
ae9e27 |
## Domain to not audit.
|
|
Chris PeBenito |
ae9e27 |
## </param>
|
|
Chris PeBenito |
ae9e27 |
#
|
|
Chris PeBenito |
ae9e27 |
interface(`userdom_search_sysadm_home_dir',`
|
|
Chris PeBenito |
ae9e27 |
gen_require(`
|
|
Chris PeBenito |
ae9e27 |
type sysadm_home_dir_t;
|
|
Chris PeBenito |
ae9e27 |
')
|
|
Chris PeBenito |
ae9e27 |
|
|
Chris PeBenito |
ae9e27 |
allow $1 sysadm_home_dir_t:dir search;
|
|
Chris PeBenito |
ae9e27 |
')
|
|
Chris PeBenito |
ae9e27 |
|
|
Chris PeBenito |
ae9e27 |
########################################
|
|
Chris PeBenito |
ae9e27 |
## <summary>
|
|
Chris PeBenito |
ae9e27 |
## Do not audit attempts to search the sysadm
|
|
Chris PeBenito |
ae9e27 |
## users home directory.
|
|
Chris PeBenito |
ae9e27 |
## </summary>
|
|
Chris PeBenito |
ae9e27 |
## <param name="domain">
|
|
Chris PeBenito |
ae9e27 |
## Domain to not audit.
|
|
Chris PeBenito |
ae9e27 |
## </param>
|
|
Chris PeBenito |
ae9e27 |
#
|
|
Chris PeBenito |
ae9e27 |
interface(`userdom_dontaudit_search_sysadm_home_dir',`
|
|
Chris PeBenito |
ae9e27 |
gen_require(`
|
|
Chris PeBenito |
ae9e27 |
type sysadm_home_dir_t;
|
|
Chris PeBenito |
ae9e27 |
')
|
|
Chris PeBenito |
ae9e27 |
|
|
Chris PeBenito |
f932d8 |
dontaudit $1 sysadm_home_dir_t:dir search_dir_perms;
|
|
Chris PeBenito |
ae9e27 |
')
|
|
Chris PeBenito |
ae9e27 |
|
|
Chris PeBenito |
ae9e27 |
########################################
|
|
Chris PeBenito |
ae9e27 |
## <summary>
|
|
Chris PeBenito |
725926 |
## List the sysadm users home directory.
|
|
Chris PeBenito |
725926 |
## </summary>
|
|
Chris PeBenito |
725926 |
## <param name="domain">
|
|
Chris PeBenito |
725926 |
## Domain allowed access.
|
|
Chris PeBenito |
725926 |
## </param>
|
|
Chris PeBenito |
725926 |
#
|
|
Chris PeBenito |
725926 |
interface(`userdom_list_sysadm_home_dir',`
|
|
Chris PeBenito |
725926 |
gen_require(`
|
|
Chris PeBenito |
725926 |
type sysadm_home_dir_t;
|
|
Chris PeBenito |
725926 |
')
|
|
Chris PeBenito |
725926 |
|
|
Chris PeBenito |
725926 |
allow $1 sysadm_home_dir_t:dir list_dir_perms;
|
|
Chris PeBenito |
725926 |
')
|
|
Chris PeBenito |
725926 |
|
|
Chris PeBenito |
725926 |
########################################
|
|
Chris PeBenito |
725926 |
## <summary>
|
|
Chris PeBenito |
b11a75 |
## Do not audit attempts to list the sysadm
|
|
Chris PeBenito |
b11a75 |
## users home directory.
|
|
Chris PeBenito |
b11a75 |
## </summary>
|
|
Chris PeBenito |
b11a75 |
## <param name="domain">
|
|
Chris PeBenito |
b11a75 |
## Domain to not audit.
|
|
Chris PeBenito |
b11a75 |
## </param>
|
|
Chris PeBenito |
b11a75 |
#
|
|
Chris PeBenito |
b11a75 |
interface(`userdom_dontaudit_list_sysadm_home_dir',`
|
|
Chris PeBenito |
b11a75 |
gen_require(`
|
|
Chris PeBenito |
b11a75 |
type sysadm_home_dir_t;
|
|
Chris PeBenito |
b11a75 |
')
|
|
Chris PeBenito |
b11a75 |
|
|
Chris PeBenito |
725926 |
dontaudit $1 sysadm_home_dir_t:dir list_dir_perms;
|
|
Chris PeBenito |
b11a75 |
')
|
|
Chris PeBenito |
b11a75 |
|
|
Chris PeBenito |
b11a75 |
########################################
|
|
Chris PeBenito |
b11a75 |
## <summary>
|
|
Chris PeBenito |
10b1f3 |
## Create objects in sysadm home directories
|
|
Chris PeBenito |
10b1f3 |
## with automatic file type transition.
|
|
Chris PeBenito |
10b1f3 |
## </summary>
|
|
Chris PeBenito |
10b1f3 |
## <param name="domain">
|
|
Chris PeBenito |
10b1f3 |
## Domain allowed access.
|
|
Chris PeBenito |
10b1f3 |
## </param>
|
|
Chris PeBenito |
10b1f3 |
## <param name="object_class" optional="true">
|
|
Chris PeBenito |
10b1f3 |
## The class of the object to be created.
|
|
Chris PeBenito |
10b1f3 |
## If not specified, file is used.
|
|
Chris PeBenito |
10b1f3 |
## </param>
|
|
Chris PeBenito |
10b1f3 |
#
|
|
Chris PeBenito |
10b1f3 |
interface(`userdom_create_sysadm_home',`
|
|
Chris PeBenito |
ae1d9a |
gen_require(`
|
|
Chris PeBenito |
ae1d9a |
type sysadm_home_dir_t, sysadm_home_t;
|
|
Chris PeBenito |
ae1d9a |
')
|
|
Chris PeBenito |
10b1f3 |
|
|
Chris PeBenito |
ae1d9a |
allow $1 sysadm_home_dir_t:dir rw_dir_perms;
|
|
Chris PeBenito |
ae1d9a |
|
|
Chris PeBenito |
ae1d9a |
ifelse(`$2',`',`
|
|
Chris PeBenito |
ae1d9a |
ifelse(`$3',`',`
|
|
Chris PeBenito |
ae1d9a |
type_transition $1 sysadm_home_dir_t:file sysadm_home_t;
|
|
Chris PeBenito |
10b1f3 |
',`
|
|
Chris PeBenito |
ae1d9a |
type_transition $1 sysadm_home_dir_t:$3 sysadm_home_t;
|
|
Chris PeBenito |
10b1f3 |
')
|
|
Chris PeBenito |
10b1f3 |
',`
|
|
Chris PeBenito |
ae1d9a |
ifelse(`$3',`',`
|
|
Chris PeBenito |
ae1d9a |
type_transition $1 sysadm_home_dir_t:file $2;
|
|
Chris PeBenito |
10b1f3 |
',`
|
|
Chris PeBenito |
ae1d9a |
type_transition $1 sysadm_home_dir_t:$3 $2;
|
|
Chris PeBenito |
10b1f3 |
')
|
|
Chris PeBenito |
10b1f3 |
')
|
|
Chris PeBenito |
10b1f3 |
')
|
|
Chris PeBenito |
10b1f3 |
|
|
Chris PeBenito |
10b1f3 |
########################################
|
|
Chris PeBenito |
10b1f3 |
## <summary>
|
|
Chris PeBenito |
10b1f3 |
## Search the sysadm users home sub directories.
|
|
Chris PeBenito |
10b1f3 |
## </summary>
|
|
Chris PeBenito |
10b1f3 |
## <param name="domain">
|
|
Chris PeBenito |
10b1f3 |
## Domain to not audit.
|
|
Chris PeBenito |
10b1f3 |
## </param>
|
|
Chris PeBenito |
10b1f3 |
#
|
|
Chris PeBenito |
10b1f3 |
interface(`userdom_search_sysadm_home_subdirs',`
|
|
Chris PeBenito |
ae1d9a |
gen_require(`
|
|
Chris PeBenito |
ae1d9a |
type sysadm_home_dir_t, sysadm_home_t;
|
|
Chris PeBenito |
10b1f3 |
')
|
|
Chris PeBenito |
ae1d9a |
|
|
Chris PeBenito |
ae1d9a |
allow $1 { sysadm_home_dir_t sysadm_home_t }:dir search_dir_perms;
|
|
Chris PeBenito |
10b1f3 |
')
|
|
Chris PeBenito |
10b1f3 |
|
|
Chris PeBenito |
10b1f3 |
########################################
|
|
Chris PeBenito |
10b1f3 |
## <summary>
|
|
Chris PeBenito |
fd89e1 |
## Read files in the sysadm users home directory.
|
|
Chris PeBenito |
fd89e1 |
## </summary>
|
|
Chris PeBenito |
fd89e1 |
## <param name="domain">
|
|
Chris PeBenito |
725926 |
## Domain allowed access.
|
|
Chris PeBenito |
fd89e1 |
## </param>
|
|
Chris PeBenito |
fd89e1 |
#
|
|
Chris PeBenito |
fd89e1 |
interface(`userdom_read_sysadm_home_files',`
|
|
Chris PeBenito |
fd89e1 |
gen_require(`
|
|
Chris PeBenito |
fd89e1 |
type sysadm_home_dir_t, sysadm_home_t;
|
|
Chris PeBenito |
fd89e1 |
')
|
|
Chris PeBenito |
fd89e1 |
|
|
Chris PeBenito |
fd89e1 |
files_search_home($1)
|
|
Chris PeBenito |
fd89e1 |
allow $1 { sysadm_home_dir_t sysadm_home_t }:dir r_dir_perms;
|
|
Chris PeBenito |
fd89e1 |
allow $1 sysadm_home_t:{ file lnk_file } r_file_perms;
|
|
Chris PeBenito |
fd89e1 |
')
|
|
Chris PeBenito |
fd89e1 |
|
|
Chris PeBenito |
fd89e1 |
########################################
|
|
Chris PeBenito |
fd89e1 |
## <summary>
|
|
Chris PeBenito |
414e41 |
## Search all users home directories.
|
|
Chris PeBenito |
ab940a |
## </summary>
|
|
Chris PeBenito |
414e41 |
## <param name="domain">
|
|
Chris PeBenito |
725926 |
## Domain allowed access.
|
|
Chris PeBenito |
414e41 |
## </param>
|
|
Chris PeBenito |
4bf4ed |
#
|
|
Chris PeBenito |
199895 |
interface(`userdom_search_all_users_home',`
|
|
Chris PeBenito |
0404a3 |
gen_require(`
|
|
Chris PeBenito |
0404a3 |
attribute home_dir_type, home_type;
|
|
Chris PeBenito |
0404a3 |
')
|
|
Chris PeBenito |
0c73cd |
|
|
Chris PeBenito |
c9428d |
files_list_home($1)
|
|
Chris PeBenito |
0c73cd |
allow $1 { home_dir_type home_type }:dir search;
|
|
Chris PeBenito |
4bf4ed |
')
|
|
Chris PeBenito |
4bf4ed |
|
|
Chris PeBenito |
4bf4ed |
########################################
|
|
Chris PeBenito |
ab940a |
## <summary>
|
|
Chris PeBenito |
ae9e27 |
## Do not audit attempts to search all users home directories.
|
|
Chris PeBenito |
ae9e27 |
## </summary>
|
|
Chris PeBenito |
ae9e27 |
## <param name="domain">
|
|
Chris PeBenito |
ae9e27 |
## Domain to not audit.
|
|
Chris PeBenito |
ae9e27 |
## </param>
|
|
Chris PeBenito |
ae9e27 |
#
|
|
Chris PeBenito |
ae9e27 |
interface(`userdom_dontaudit_search_all_users_home',`
|
|
Chris PeBenito |
ae9e27 |
gen_require(`
|
|
Chris PeBenito |
ae9e27 |
attribute home_dir_type, home_type;
|
|
Chris PeBenito |
ae9e27 |
')
|
|
Chris PeBenito |
ae9e27 |
|
|
Chris PeBenito |
e6a2ea |
dontaudit $1 { home_dir_type home_type }:dir search_dir_perms;
|
|
Chris PeBenito |
ae9e27 |
')
|
|
Chris PeBenito |
ae9e27 |
|
|
Chris PeBenito |
ae9e27 |
########################################
|
|
Chris PeBenito |
ae9e27 |
## <summary>
|
|
Chris PeBenito |
414e41 |
## Read all files in all users home directories.
|
|
Chris PeBenito |
ab940a |
## </summary>
|
|
Chris PeBenito |
414e41 |
## <param name="domain">
|
|
Chris PeBenito |
725926 |
## Domain allowed access.
|
|
Chris PeBenito |
414e41 |
## </param>
|
|
Chris PeBenito |
daa0e0 |
#
|
|
Chris PeBenito |
fd89e1 |
interface(`userdom_read_all_user_files',`
|
|
Chris PeBenito |
0404a3 |
gen_require(`
|
|
Chris PeBenito |
0404a3 |
attribute home_type;
|
|
Chris PeBenito |
0404a3 |
')
|
|
Chris PeBenito |
0c73cd |
|
|
Chris PeBenito |
c9428d |
files_list_home($1)
|
|
Chris PeBenito |
cc41a9 |
allow $1 home_type:dir r_dir_perms;
|
|
Chris PeBenito |
0fd9dc |
allow $1 home_type:file r_file_perms;
|
|
Chris PeBenito |
daa0e0 |
')
|
|
Chris PeBenito |
daa0e0 |
|
|
Chris PeBenito |
daa0e0 |
########################################
|
|
Chris PeBenito |
ab940a |
## <summary>
|
|
Chris PeBenito |
fc6524 |
## Create, read, write, and delete all directories
|
|
Chris PeBenito |
fc6524 |
## in all users home directories.
|
|
Chris PeBenito |
fc6524 |
## </summary>
|
|
Chris PeBenito |
fc6524 |
## <param name="domain">
|
|
Chris PeBenito |
725926 |
## Domain allowed access.
|
|
Chris PeBenito |
fc6524 |
## </param>
|
|
Chris PeBenito |
fc6524 |
#
|
|
Chris PeBenito |
fc6524 |
interface(`userdom_manage_all_user_dirs',`
|
|
Chris PeBenito |
fc6524 |
gen_require(`
|
|
Chris PeBenito |
fc6524 |
attribute home_type;
|
|
Chris PeBenito |
fc6524 |
')
|
|
Chris PeBenito |
fc6524 |
|
|
Chris PeBenito |
fc6524 |
files_list_home($1)
|
|
Chris PeBenito |
fc6524 |
allow $1 home_type:dir create_dir_perms;
|
|
Chris PeBenito |
fc6524 |
')
|
|
Chris PeBenito |
fc6524 |
|
|
Chris PeBenito |
fc6524 |
########################################
|
|
Chris PeBenito |
fc6524 |
## <summary>
|
|
Chris PeBenito |
fc6524 |
## Create, read, write, and delete all files
|
|
Chris PeBenito |
fc6524 |
## in all users home directories.
|
|
Chris PeBenito |
fc6524 |
## </summary>
|
|
Chris PeBenito |
fc6524 |
## <param name="domain">
|
|
Chris PeBenito |
725926 |
## Domain allowed access.
|
|
Chris PeBenito |
fc6524 |
## </param>
|
|
Chris PeBenito |
fc6524 |
#
|
|
Chris PeBenito |
fc6524 |
interface(`userdom_manage_all_user_files',`
|
|
Chris PeBenito |
fc6524 |
gen_require(`
|
|
Chris PeBenito |
fc6524 |
attribute home_type;
|
|
Chris PeBenito |
fc6524 |
')
|
|
Chris PeBenito |
fc6524 |
|
|
Chris PeBenito |
fc6524 |
files_list_home($1)
|
|
Chris PeBenito |
fc6524 |
allow $1 home_type:dir rw_dir_perms;
|
|
Chris PeBenito |
fc6524 |
allow $1 home_type:file create_file_perms;
|
|
Chris PeBenito |
fc6524 |
')
|
|
Chris PeBenito |
fc6524 |
|
|
Chris PeBenito |
fc6524 |
########################################
|
|
Chris PeBenito |
fc6524 |
## <summary>
|
|
Chris PeBenito |
fc6524 |
## Create, read, write, and delete all symlinks
|
|
Chris PeBenito |
fc6524 |
## in all users home directories.
|
|
Chris PeBenito |
fc6524 |
## </summary>
|
|
Chris PeBenito |
fc6524 |
## <param name="domain">
|
|
Chris PeBenito |
725926 |
## Domain allowed access.
|
|
Chris PeBenito |
fc6524 |
## </param>
|
|
Chris PeBenito |
fc6524 |
#
|
|
Chris PeBenito |
fc6524 |
interface(`userdom_manage_all_user_symlinks',`
|
|
Chris PeBenito |
fc6524 |
gen_require(`
|
|
Chris PeBenito |
fc6524 |
attribute home_type;
|
|
Chris PeBenito |
fc6524 |
')
|
|
Chris PeBenito |
fc6524 |
|
|
Chris PeBenito |
fc6524 |
files_list_home($1)
|
|
Chris PeBenito |
fc6524 |
allow $1 home_type:dir rw_dir_perms;
|
|
Chris PeBenito |
fc6524 |
allow $1 home_type:lnk_file create_lnk_perms;
|
|
Chris PeBenito |
fc6524 |
')
|
|
Chris PeBenito |
fc6524 |
|
|
Chris PeBenito |
fc6524 |
########################################
|
|
Chris PeBenito |
fc6524 |
## <summary>
|
|
Chris PeBenito |
784a3b |
## Make the specified domain a privileged
|
|
Chris PeBenito |
784a3b |
## home directory manager.
|
|
Chris PeBenito |
784a3b |
## </summary>
|
|
Chris PeBenito |
784a3b |
## <desc>
|
|
Chris PeBenito |
784a3b |
##
|
|
Chris PeBenito |
784a3b |
## Make the specified domain a privileged
|
|
Chris PeBenito |
784a3b |
## home directory manager. This domain will be
|
|
Chris PeBenito |
784a3b |
## able to manage the contents of all users
|
|
Chris PeBenito |
784a3b |
## general home directory content, and create
|
|
Chris PeBenito |
784a3b |
## files with the correct context.
|
|
Chris PeBenito |
784a3b |
##
|
|
Chris PeBenito |
784a3b |
## </desc>
|
|
Chris PeBenito |
784a3b |
## <param name="domain">
|
|
Chris PeBenito |
725926 |
## Domain allowed access.
|
|
Chris PeBenito |
784a3b |
## </param>
|
|
Chris PeBenito |
784a3b |
#
|
|
Chris PeBenito |
784a3b |
interface(`userdom_priveleged_home_dir_manager',`
|
|
Chris PeBenito |
784a3b |
gen_require(`
|
|
Chris PeBenito |
784a3b |
attribute privhome;
|
|
Chris PeBenito |
784a3b |
')
|
|
Chris PeBenito |
784a3b |
|
|
Chris PeBenito |
784a3b |
files_list_home($1)
|
|
Chris PeBenito |
784a3b |
typeattribute $1 privhome;
|
|
Chris PeBenito |
784a3b |
')
|
|
Chris PeBenito |
784a3b |
|
|
Chris PeBenito |
784a3b |
########################################
|
|
Chris PeBenito |
784a3b |
## <summary>
|
|
Chris PeBenito |
57a96c |
## Send general signals to unprivileged user domains.
|
|
Chris PeBenito |
ab940a |
## </summary>
|
|
Chris PeBenito |
ab940a |
## <param name="domain">
|
|
Chris PeBenito |
725926 |
## Domain allowed access.
|
|
Chris PeBenito |
ab940a |
## </param>
|
|
Chris PeBenito |
ab940a |
#
|
|
Chris PeBenito |
57a96c |
interface(`userdom_signal_unpriv_users',`
|
|
Chris PeBenito |
ab940a |
gen_require(`
|
|
Chris PeBenito |
57a96c |
attribute unpriv_userdomain;
|
|
Chris PeBenito |
ab940a |
')
|
|
Chris PeBenito |
ab940a |
|
|
Chris PeBenito |
57a96c |
allow $1 unpriv_userdomain:process signal;
|
|
Chris PeBenito |
ab940a |
')
|
|
Chris PeBenito |
ab940a |
|
|
Chris PeBenito |
ab940a |
########################################
|
|
Chris PeBenito |
ab940a |
## <summary>
|
|
Chris PeBenito |
57a96c |
## Inherit the file descriptors from unprivileged user domains.
|
|
Chris PeBenito |
ab940a |
## </summary>
|
|
Chris PeBenito |
414e41 |
## <param name="domain">
|
|
Chris PeBenito |
725926 |
## Domain allowed access.
|
|
Chris PeBenito |
414e41 |
## </param>
|
|
Chris PeBenito |
490639 |
#
|
|
Chris PeBenito |
57a96c |
interface(`userdom_use_unpriv_users_fd',`
|
|
Chris PeBenito |
0404a3 |
gen_require(`
|
|
Chris PeBenito |
57a96c |
attribute unpriv_userdomain;
|
|
Chris PeBenito |
0404a3 |
')
|
|
Chris PeBenito |
0c73cd |
|
|
Chris PeBenito |
57a96c |
allow $1 unpriv_userdomain:fd use;
|
|
Chris PeBenito |
490639 |
')
|
|
Chris PeBenito |
490639 |
|
|
Chris PeBenito |
daa0e0 |
########################################
|
|
Chris PeBenito |
ab940a |
## <summary>
|
|
Chris PeBenito |
57a96c |
## Do not audit attempts to inherit the
|
|
Chris PeBenito |
57a96c |
## file descriptors from all user domains.
|
|
Chris PeBenito |
ab940a |
## </summary>
|
|
Chris PeBenito |
414e41 |
## <param name="domain">
|
|
Chris PeBenito |
725926 |
## Domain allowed access.
|
|
Chris PeBenito |
414e41 |
## </param>
|
|
Chris PeBenito |
4bf4ed |
#
|
|
Chris PeBenito |
57a96c |
interface(`userdom_dontaudit_use_unpriv_user_fd',`
|
|
Chris PeBenito |
0404a3 |
gen_require(`
|
|
Chris PeBenito |
57a96c |
attribute unpriv_userdomain;
|
|
Chris PeBenito |
0404a3 |
')
|
|
Chris PeBenito |
0c73cd |
|
|
Chris PeBenito |
57a96c |
dontaudit $1 unpriv_userdomain:fd use;
|
|
Chris PeBenito |
4bf4ed |
')
|
|
Chris PeBenito |
4bf4ed |
|
|
Chris PeBenito |
0404a3 |
########################################
|
|
Chris PeBenito |
ab940a |
## <summary>
|
|
Chris PeBenito |
57a96c |
## Create generic user home directories
|
|
Chris PeBenito |
57a96c |
## with automatic file type transition.
|
|
Chris PeBenito |
ab940a |
## </summary>
|
|
Chris PeBenito |
414e41 |
## <param name="domain">
|
|
Chris PeBenito |
57a96c |
## Domain allowed access.
|
|
Chris PeBenito |
414e41 |
## </param>
|
|
Chris PeBenito |
0404a3 |
#
|
|
Chris PeBenito |
671673 |
interface(`userdom_create_generic_user_home_dir',`
|
|
Chris PeBenito |
0404a3 |
gen_require(`
|
|
Chris PeBenito |
57a96c |
type user_home_dir_t;
|
|
Chris PeBenito |
0404a3 |
')
|
|
Chris PeBenito |
0c73cd |
|
|
Chris PeBenito |
57a96c |
files_create_home_dirs($1,user_home_dir_t)
|
|
Chris PeBenito |
4bf4ed |
')
|
|
Chris PeBenito |
4bf4ed |
|
|
Chris PeBenito |
4bf4ed |
########################################
|
|
Chris PeBenito |
ab940a |
## <summary>
|
|
Chris PeBenito |
4614e8 |
## Search generic user home directories.
|
|
Chris PeBenito |
4614e8 |
## </summary>
|
|
Chris PeBenito |
4614e8 |
## <param name="domain">
|
|
Chris PeBenito |
4614e8 |
## Domain allowed access.
|
|
Chris PeBenito |
4614e8 |
## </param>
|
|
Chris PeBenito |
4614e8 |
#
|
|
Chris PeBenito |
4614e8 |
interface(`userdom_search_generic_user_home_dir',`
|
|
Chris PeBenito |
4614e8 |
gen_require(`
|
|
Chris PeBenito |
4614e8 |
type user_home_dir_t;
|
|
Chris PeBenito |
4614e8 |
')
|
|
Chris PeBenito |
4614e8 |
|
|
Chris PeBenito |
4614e8 |
allow $1 user_home_dir_t:dir search_dir_perms;
|
|
Chris PeBenito |
4614e8 |
')
|
|
Chris PeBenito |
4614e8 |
|
|
Chris PeBenito |
4614e8 |
########################################
|
|
Chris PeBenito |
4614e8 |
## <summary>
|
|
Chris PeBenito |
57a96c |
## Create, read, write, and delete
|
|
Chris PeBenito |
57a96c |
## generic user home directories.
|
|
Chris PeBenito |
ab940a |
## </summary>
|
|
Chris PeBenito |
414e41 |
## <param name="domain">
|
|
Chris PeBenito |
57a96c |
## Domain allowed access.
|
|
Chris PeBenito |
414e41 |
## </param>
|
|
Chris PeBenito |
daa0e0 |
#
|
|
Chris PeBenito |
671673 |
interface(`userdom_manage_generic_user_home_dir',`
|
|
Chris PeBenito |
0404a3 |
gen_require(`
|
|
Chris PeBenito |
57a96c |
type user_home_dir_t;
|
|
Chris PeBenito |
0404a3 |
')
|
|
Chris PeBenito |
0c73cd |
|
|
Chris PeBenito |
57a96c |
allow $1 user_home_dir_t:dir create_dir_perms;
|
|
Chris PeBenito |
daa0e0 |
')
|
|
Chris PeBenito |
daa0e0 |
|
|
Chris PeBenito |
daa0e0 |
########################################
|
|
Chris PeBenito |
ab940a |
## <summary>
|
|
Chris PeBenito |
57a96c |
## Create objects in generic user home directories
|
|
Chris PeBenito |
57a96c |
## with automatic file type transition.
|
|
Chris PeBenito |
57a96c |
## </summary>
|
|
Chris PeBenito |
57a96c |
## <param name="domain">
|
|
Chris PeBenito |
57a96c |
## Domain allowed access.
|
|
Chris PeBenito |
57a96c |
## </param>
|
|
Chris PeBenito |
57a96c |
## <param name="object_class" optional="true">
|
|
Chris PeBenito |
57a96c |
## The class of the object to be created.
|
|
Chris PeBenito |
57a96c |
## If not specified, file is used.
|
|
Chris PeBenito |
57a96c |
## </param>
|
|
Chris PeBenito |
57a96c |
#
|
|
Chris PeBenito |
671673 |
interface(`userdom_create_generic_user_home',`
|
|
Chris PeBenito |
57a96c |
gen_require(`
|
|
Chris PeBenito |
57a96c |
type user_home_dir_t, user_home_t;
|
|
Chris PeBenito |
57a96c |
')
|
|
Chris PeBenito |
57a96c |
|
|
Chris PeBenito |
a996bd |
allow $1 user_home_dir_t:dir rw_dir_perms;
|
|
Chris PeBenito |
57a96c |
ifelse(`$2',`',`
|
|
Chris PeBenito |
57a96c |
type_transition $1 user_home_dir_t:file user_home_t;
|
|
Chris PeBenito |
57a96c |
',`
|
|
Chris PeBenito |
57a96c |
type_transition $1 user_home_dir_t:$2 user_home_t;
|
|
Chris PeBenito |
57a96c |
')
|
|
Chris PeBenito |
57a96c |
')
|
|
Chris PeBenito |
57a96c |
|
|
Chris PeBenito |
57a96c |
########################################
|
|
Chris PeBenito |
57a96c |
## <summary>
|
|
Chris PeBenito |
d4dca5 |
## Don't audit search on the user home subdirectory.
|
|
Chris PeBenito |
d4dca5 |
## </summary>
|
|
Chris PeBenito |
d4dca5 |
## <param name="domain">
|
|
Chris PeBenito |
d4dca5 |
## Domain allowed access.
|
|
Chris PeBenito |
d4dca5 |
## </param>
|
|
Chris PeBenito |
d4dca5 |
#
|
|
Chris PeBenito |
d4dca5 |
interface(`userdom_dontaudit_search_user_home_dirs',`
|
|
Chris PeBenito |
d4dca5 |
gen_require(`
|
|
Chris PeBenito |
d4dca5 |
type user_home_t;
|
|
Chris PeBenito |
d4dca5 |
')
|
|
Chris PeBenito |
d4dca5 |
|
|
Chris PeBenito |
d4dca5 |
dontaudit $1 user_home_t:dir search;
|
|
Chris PeBenito |
d4dca5 |
')
|
|
Chris PeBenito |
d4dca5 |
|
|
Chris PeBenito |
d4dca5 |
########################################
|
|
Chris PeBenito |
d4dca5 |
## <summary>
|
|
Chris PeBenito |
57a96c |
## Create, read, write, and delete
|
|
Chris PeBenito |
57a96c |
## subdirectories of generic user
|
|
Chris PeBenito |
57a96c |
## home directories.
|
|
Chris PeBenito |
57a96c |
## </summary>
|
|
Chris PeBenito |
57a96c |
## <param name="domain">
|
|
Chris PeBenito |
57a96c |
## Domain allowed access.
|
|
Chris PeBenito |
57a96c |
## </param>
|
|
Chris PeBenito |
57a96c |
#
|
|
Chris PeBenito |
671673 |
interface(`userdom_manage_generic_user_home_dirs',`
|
|
Chris PeBenito |
57a96c |
gen_require(`
|
|
Chris PeBenito |
57a96c |
type user_home_t;
|
|
Chris PeBenito |
57a96c |
')
|
|
Chris PeBenito |
57a96c |
|
|
Chris PeBenito |
57a96c |
allow $1 user_home_t:dir create_dir_perms;
|
|
Chris PeBenito |
57a96c |
')
|
|
Chris PeBenito |
57a96c |
|
|
Chris PeBenito |
57a96c |
########################################
|
|
Chris PeBenito |
57a96c |
## <summary>
|
|
Chris PeBenito |
57a96c |
## Create, read, write, and delete files
|
|
Chris PeBenito |
57a96c |
## in generic user home directories.
|
|
Chris PeBenito |
57a96c |
## </summary>
|
|
Chris PeBenito |
57a96c |
## <param name="domain">
|
|
Chris PeBenito |
57a96c |
## Domain allowed access.
|
|
Chris PeBenito |
57a96c |
## </param>
|
|
Chris PeBenito |
57a96c |
#
|
|
Chris PeBenito |
671673 |
interface(`userdom_manage_generic_user_home_files',`
|
|
Chris PeBenito |
57a96c |
gen_require(`
|
|
Chris PeBenito |
57a96c |
type user_home_t;
|
|
Chris PeBenito |
57a96c |
')
|
|
Chris PeBenito |
57a96c |
|
|
Chris PeBenito |
57a96c |
allow $1 user_home_t:dir rw_dir_perms;
|
|
Chris PeBenito |
57a96c |
allow $1 user_home_t:file create_file_perms;
|
|
Chris PeBenito |
57a96c |
')
|
|
Chris PeBenito |
57a96c |
|
|
Chris PeBenito |
57a96c |
########################################
|
|
Chris PeBenito |
57a96c |
## <summary>
|
|
Chris PeBenito |
57a96c |
## Create, read, write, and delete symbolic
|
|
Chris PeBenito |
57a96c |
## links in generic user home directories.
|
|
Chris PeBenito |
57a96c |
## </summary>
|
|
Chris PeBenito |
57a96c |
## <param name="domain">
|
|
Chris PeBenito |
57a96c |
## Domain allowed access.
|
|
Chris PeBenito |
57a96c |
## </param>
|
|
Chris PeBenito |
57a96c |
#
|
|
Chris PeBenito |
671673 |
interface(`userdom_manage_generic_user_home_symlinks',`
|
|
Chris PeBenito |
57a96c |
gen_require(`
|
|
Chris PeBenito |
57a96c |
type user_home_t;
|
|
Chris PeBenito |
57a96c |
')
|
|
Chris PeBenito |
57a96c |
|
|
Chris PeBenito |
57a96c |
allow $1 user_home_t:dir rw_dir_perms;
|
|
Chris PeBenito |
57a96c |
allow $1 user_home_t:lnk_file create_lnk_perms;
|
|
Chris PeBenito |
57a96c |
')
|
|
Chris PeBenito |
57a96c |
|
|
Chris PeBenito |
57a96c |
########################################
|
|
Chris PeBenito |
57a96c |
## <summary>
|
|
Chris PeBenito |
57a96c |
## Create, read, write, and delete named
|
|
Chris PeBenito |
57a96c |
## pipes in generic user home directories.
|
|
Chris PeBenito |
57a96c |
## </summary>
|
|
Chris PeBenito |
57a96c |
## <param name="domain">
|
|
Chris PeBenito |
57a96c |
## Domain allowed access.
|
|
Chris PeBenito |
57a96c |
## </param>
|
|
Chris PeBenito |
57a96c |
#
|
|
Chris PeBenito |
671673 |
interface(`userdom_manage_generic_user_home_pipes',`
|
|
Chris PeBenito |
57a96c |
gen_require(`
|
|
Chris PeBenito |
57a96c |
type user_home_t;
|
|
Chris PeBenito |
57a96c |
')
|
|
Chris PeBenito |
57a96c |
|
|
Chris PeBenito |
57a96c |
allow $1 user_home_t:dir rw_dir_perms;
|
|
Chris PeBenito |
57a96c |
allow $1 user_home_t:fifo_file create_file_perms;
|
|
Chris PeBenito |
57a96c |
')
|
|
Chris PeBenito |
57a96c |
|
|
Chris PeBenito |
57a96c |
########################################
|
|
Chris PeBenito |
57a96c |
## <summary>
|
|
Chris PeBenito |
57a96c |
## Create, read, write, and delete named
|
|
Chris PeBenito |
57a96c |
## sockets in generic user home directories.
|
|
Chris PeBenito |
57a96c |
## </summary>
|
|
Chris PeBenito |
57a96c |
## <param name="domain">
|
|
Chris PeBenito |
57a96c |
## Domain allowed access.
|
|
Chris PeBenito |
57a96c |
## </param>
|
|
Chris PeBenito |
57a96c |
#
|
|
Chris PeBenito |
671673 |
interface(`userdom_manage_generic_user_home_sockets',`
|
|
Chris PeBenito |
57a96c |
gen_require(`
|
|
Chris PeBenito |
57a96c |
type user_home_t;
|
|
Chris PeBenito |
57a96c |
')
|
|
Chris PeBenito |
57a96c |
|
|
Chris PeBenito |
57a96c |
allow $1 user_home_t:dir rw_dir_perms;
|
|
Chris PeBenito |
57a96c |
allow $1 user_home_t:sock_file create_file_perms;
|
|
Chris PeBenito |
57a96c |
')
|
|
Chris PeBenito |
57a96c |
|
|
Chris PeBenito |
57a96c |
########################################
|
|
Chris PeBenito |
57a96c |
## <summary>
|
|
Chris PeBenito |
e08118 |
## Search all unprivileged users home directories.
|
|
Chris PeBenito |
e08118 |
## </summary>
|
|
Chris PeBenito |
e08118 |
## <param name="domain">
|
|
Chris PeBenito |
e08118 |
## Domain allowed access.
|
|
Chris PeBenito |
e08118 |
## </param>
|
|
Chris PeBenito |
e08118 |
#
|
|
Chris PeBenito |
e08118 |
interface(`userdom_search_unpriv_user_home_dirs',`
|
|
Chris PeBenito |
e08118 |
gen_require(`
|
|
Chris PeBenito |
e08118 |
attribute user_home_dir_type;
|
|
Chris PeBenito |
e08118 |
')
|
|
Chris PeBenito |
e08118 |
|
|
Chris PeBenito |
f932d8 |
files_search_home($1)
|
|
Chris PeBenito |
f932d8 |
allow $1 user_home_dir_type:dir search_dir_perms;
|
|
Chris PeBenito |
e08118 |
')
|
|
Chris PeBenito |
e08118 |
|
|
Chris PeBenito |
e08118 |
########################################
|
|
Chris PeBenito |
e08118 |
## <summary>
|
|
Chris PeBenito |
d4dca5 |
## Read all unprivileged users home directory
|
|
Chris PeBenito |
d4dca5 |
## files.
|
|
Chris PeBenito |
d4dca5 |
## </summary>
|
|
Chris PeBenito |
d4dca5 |
## <param name="domain">
|
|
Chris PeBenito |
d4dca5 |
## Domain allowed access.
|
|
Chris PeBenito |
d4dca5 |
## </param>
|
|
Chris PeBenito |
d4dca5 |
#
|
|
Chris PeBenito |
d4dca5 |
interface(`userdom_read_unpriv_user_home_files',`
|
|
Chris PeBenito |
d4dca5 |
gen_require(`
|
|
Chris PeBenito |
90c3dd |
attribute user_home_dir_type, user_home_type;
|
|
Chris PeBenito |
d4dca5 |
')
|
|
Chris PeBenito |
d4dca5 |
|
|
Chris PeBenito |
d4dca5 |
allow $1 user_home_dir_type:dir search;
|
|
Chris PeBenito |
d4dca5 |
allow $1 user_home_type:file r_file_perms;
|
|
Chris PeBenito |
d4dca5 |
')
|
|
Chris PeBenito |
d4dca5 |
|
|
Chris PeBenito |
d4dca5 |
########################################
|
|
Chris PeBenito |
d4dca5 |
## <summary>
|
|
Chris PeBenito |
725926 |
## Set the attributes of user ptys.
|
|
Chris PeBenito |
43989f |
## </summary>
|
|
Chris PeBenito |
43989f |
## <param name="domain">
|
|
Chris PeBenito |
43989f |
## Domain allowed access.
|
|
Chris PeBenito |
43989f |
## </param>
|
|
Chris PeBenito |
43989f |
#
|
|
Chris PeBenito |
725926 |
interface(`userdom_setattr_unpriv_user_pty',`
|
|
Chris PeBenito |
43989f |
gen_require(`
|
|
Chris PeBenito |
725926 |
attribute user_ptynode;
|
|
Chris PeBenito |
43989f |
')
|
|
Chris PeBenito |
43989f |
|
|
Chris PeBenito |
725926 |
allow $1 user_ptynode:chr_file setattr;
|
|
Chris PeBenito |
725926 |
')
|
|
Chris PeBenito |
725926 |
|
|
Chris PeBenito |
725926 |
########################################
|
|
Chris PeBenito |
725926 |
## <summary>
|
|
Chris PeBenito |
6820a3 |
## Read and write unprivileged user ptys.
|
|
Chris PeBenito |
6820a3 |
## </summary>
|
|
Chris PeBenito |
6820a3 |
## <param name="domain">
|
|
Chris PeBenito |
6820a3 |
## Domain allowed access.
|
|
Chris PeBenito |
6820a3 |
## </param>
|
|
Chris PeBenito |
6820a3 |
#
|
|
Chris PeBenito |
6820a3 |
interface(`userdom_use_unpriv_user_pty',`
|
|
Chris PeBenito |
6820a3 |
ifdef(`targeted_policy',`
|
|
Chris PeBenito |
6820a3 |
term_use_generic_pty($1)
|
|
Chris PeBenito |
6820a3 |
',`
|
|
Chris PeBenito |
6820a3 |
gen_require(`
|
|
Chris PeBenito |
6820a3 |
attribute user_ptynode;
|
|
Chris PeBenito |
6820a3 |
')
|
|
Chris PeBenito |
6820a3 |
|
|
Chris PeBenito |
6820a3 |
term_search_ptys($1)
|
|
Chris PeBenito |
6820a3 |
allow $1 user_ptynode:chr_file rw_file_perms;
|
|
Chris PeBenito |
6820a3 |
')
|
|
Chris PeBenito |
6820a3 |
')
|
|
Chris PeBenito |
6820a3 |
|
|
Chris PeBenito |
6820a3 |
########################################
|
|
Chris PeBenito |
6820a3 |
## <summary>
|
|
Chris PeBenito |
1504ff |
## Do not audit attempts to use unprivileged
|
|
Chris PeBenito |
1504ff |
## user ptys.
|
|
Chris PeBenito |
1504ff |
## </summary>
|
|
Chris PeBenito |
1504ff |
## <param name="domain">
|
|
Chris PeBenito |
6820a3 |
## Domain to not audit.
|
|
Chris PeBenito |
1504ff |
## </param>
|
|
Chris PeBenito |
1504ff |
#
|
|
Chris PeBenito |
1504ff |
interface(`userdom_dontaudit_use_unpriv_user_pty',`
|
|
Chris PeBenito |
1504ff |
ifdef(`targeted_policy',`
|
|
Chris PeBenito |
1504ff |
term_dontaudit_use_generic_pty($1)
|
|
Chris PeBenito |
1504ff |
',`
|
|
Chris PeBenito |
1504ff |
gen_require(`
|
|
Chris PeBenito |
1504ff |
attribute user_ptynode;
|
|
Chris PeBenito |
1504ff |
')
|
|
Chris PeBenito |
1504ff |
|
|
Chris PeBenito |
1504ff |
dontaudit $1 user_ptynode:chr_file rw_file_perms;
|
|
Chris PeBenito |
1504ff |
')
|
|
Chris PeBenito |
1504ff |
')
|
|
Chris PeBenito |
1504ff |
|
|
Chris PeBenito |
1504ff |
########################################
|
|
Chris PeBenito |
1504ff |
## <summary>
|
|
Chris PeBenito |
725926 |
## Read all unprivileged users temporary directories.
|
|
Chris PeBenito |
725926 |
## </summary>
|
|
Chris PeBenito |
725926 |
## <param name="domain">
|
|
Chris PeBenito |
725926 |
## Domain allowed access.
|
|
Chris PeBenito |
725926 |
## </param>
|
|
Chris PeBenito |
725926 |
#
|
|
Chris PeBenito |
725926 |
interface(`userdom_list_unpriv_user_tmp',`
|
|
Chris PeBenito |
725926 |
ifdef(`targeted_policy',`
|
|
Chris PeBenito |
725926 |
files_list_tmp($1)
|
|
Chris PeBenito |
725926 |
',`
|
|
Chris PeBenito |
725926 |
gen_require(`
|
|
Chris PeBenito |
725926 |
attribute user_tmpfile;
|
|
Chris PeBenito |
725926 |
')
|
|
Chris PeBenito |
725926 |
|
|
Chris PeBenito |
725926 |
allow $1 user_tmpfile:dir list_dir_perms;
|
|
Chris PeBenito |
725926 |
')
|
|
Chris PeBenito |
43989f |
')
|
|
Chris PeBenito |
43989f |
|
|
Chris PeBenito |
43989f |
########################################
|
|
Chris PeBenito |
43989f |
## <summary>
|
|
Chris PeBenito |
43989f |
## Read all unprivileged users temporary files.
|
|
Chris PeBenito |
43989f |
## </summary>
|
|
Chris PeBenito |
43989f |
## <param name="domain">
|
|
Chris PeBenito |
43989f |
## Domain allowed access.
|
|
Chris PeBenito |
43989f |
## </param>
|
|
Chris PeBenito |
43989f |
#
|
|
Chris PeBenito |
43989f |
interface(`userdom_read_unpriv_user_tmp_files',`
|
|
Chris PeBenito |
725926 |
ifdef(`targeted_policy',`
|
|
Chris PeBenito |
725926 |
files_read_generic_tmp_files($1)
|
|
Chris PeBenito |
725926 |
',`
|
|
Chris PeBenito |
725926 |
gen_require(`
|
|
Chris PeBenito |
725926 |
attribute user_tmpfile;
|
|
Chris PeBenito |
725926 |
')
|
|
Chris PeBenito |
43989f |
|
|
Chris PeBenito |
725926 |
allow $1 user_tmpfile:file { read getattr };
|
|
Chris PeBenito |
725926 |
')
|
|
Chris PeBenito |
43989f |
')
|
|
Chris PeBenito |
43989f |
|
|
Chris PeBenito |
43989f |
########################################
|
|
Chris PeBenito |
43989f |
## <summary>
|
|
Chris PeBenito |
43989f |
## Read all unprivileged users temporary symbolic links.
|
|
Chris PeBenito |
43989f |
## </summary>
|
|
Chris PeBenito |
43989f |
## <param name="domain">
|
|
Chris PeBenito |
43989f |
## Domain allowed access.
|
|
Chris PeBenito |
43989f |
## </param>
|
|
Chris PeBenito |
43989f |
#
|
|
Chris PeBenito |
43989f |
interface(`userdom_read_unpriv_user_tmp_symlinks',`
|
|
Chris PeBenito |
725926 |
ifdef(`targeted_policy',`
|
|
Chris PeBenito |
725926 |
files_read_generic_tmp_symlinks($1)
|
|
Chris PeBenito |
725926 |
',`
|
|
Chris PeBenito |
725926 |
gen_require(`
|
|
Chris PeBenito |
725926 |
attribute user_tmpfile;
|
|
Chris PeBenito |
725926 |
')
|
|
Chris PeBenito |
43989f |
|
|
Chris PeBenito |
725926 |
allow $1 user_tmpfile:lnk_file { getattr read };
|
|
Chris PeBenito |
725926 |
')
|
|
Chris PeBenito |
43989f |
')
|
|
Chris PeBenito |
43989f |
|
|
Chris PeBenito |
43989f |
########################################
|
|
Chris PeBenito |
43989f |
## <summary>
|
|
Chris PeBenito |
57a96c |
## Write all unprivileged users files in /tmp
|
|
Chris PeBenito |
ab940a |
## </summary>
|
|
Chris PeBenito |
414e41 |
## <param name="domain">
|
|
Chris PeBenito |
725926 |
## Domain allowed access.
|
|
Chris PeBenito |
414e41 |
## </param>
|
|
Chris PeBenito |
daa0e0 |
#
|
|
Chris PeBenito |
57a96c |
interface(`userdom_write_unpriv_user_tmp',`
|
|
Chris PeBenito |
0404a3 |
gen_require(`
|
|
Chris PeBenito |
57a96c |
attribute user_tmpfile;
|
|
Chris PeBenito |
0404a3 |
')
|
|
Chris PeBenito |
0c73cd |
|
|
Chris PeBenito |
57a96c |
allow $1 user_tmpfile:file { getattr write append };
|
|
Chris PeBenito |
daa0e0 |
')
|
|
Chris PeBenito |
daa0e0 |
|
|
Chris PeBenito |
ebdc3b |
########################################
|
|
Chris PeBenito |
ebdc3b |
## <summary>
|
|
Chris PeBenito |
ebdc3b |
## Do not audit attempts to use unprivileged
|
|
Chris PeBenito |
ebdc3b |
## user ttys.
|
|
Chris PeBenito |
ebdc3b |
## </summary>
|
|
Chris PeBenito |
ebdc3b |
## <param name="domain">
|
|
Chris PeBenito |
725926 |
## Domain allowed access.
|
|
Chris PeBenito |
ebdc3b |
## </param>
|
|
Chris PeBenito |
ebdc3b |
#
|
|
Chris PeBenito |
ebdc3b |
interface(`userdom_dontaudit_use_unpriv_user_tty',`
|
|
Chris PeBenito |
9cc2cc |
ifdef(`targeted_policy',`
|
|
Chris PeBenito |
d828b5 |
term_dontaudit_use_unallocated_tty($1)
|
|
Chris PeBenito |
9cc2cc |
',`
|
|
Chris PeBenito |
9cc2cc |
gen_require(`
|
|
Chris PeBenito |
9cc2cc |
attribute user_ttynode;
|
|
Chris PeBenito |
9cc2cc |
')
|
|
Chris PeBenito |
ebdc3b |
|
|
Chris PeBenito |
9cc2cc |
dontaudit $1 user_ttynode:chr_file rw_file_perms;
|
|
Chris PeBenito |
9cc2cc |
')
|
|
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 |
2629c6 |
## Domain allowed access.
|
|
Chris PeBenito |
2629c6 |
## </param>
|
|
Chris PeBenito |
2629c6 |
#
|
|
Chris PeBenito |
2629c6 |
interface(`userdom_read_all_userdomains_state',`
|
|
Chris PeBenito |
2629c6 |
gen_require(`
|
|
Chris PeBenito |
2629c6 |
attribute userdomain;
|
|
Chris PeBenito |
2629c6 |
')
|
|
Chris PeBenito |
2629c6 |
|
|
Chris PeBenito |
2629c6 |
allow $1 userdomain:dir search_dir_perms;
|
|
Chris PeBenito |
2629c6 |
allow $1 userdomain:file r_file_perms;
|
|
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 |
2629c6 |
## Domain allowed access.
|
|
Chris PeBenito |
2629c6 |
## </param>
|
|
Chris PeBenito |
2629c6 |
#
|
|
Chris PeBenito |
2629c6 |
interface(`userdom_getattr_all_userdomains',`
|
|
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 |
725926 |
## Domain allowed access.
|
|
Chris PeBenito |
57a96c |
## </param>
|
|
Chris PeBenito |
57a96c |
#
|
|
Chris PeBenito |
57a96c |
interface(`userdom_use_all_user_fd',`
|
|
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 |
eb3cb6 |
## Domain to not audit.
|
|
Chris PeBenito |
eb3cb6 |
## </param>
|
|
Chris PeBenito |
eb3cb6 |
#
|
|
Chris PeBenito |
eb3cb6 |
interface(`userdom_dontaudit_use_all_user_fd',`
|
|
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 |
725926 |
## Domain allowed access.
|
|
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 |
246839 |
## Domain allowed access.
|
|
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 |
9fd4b8 |
## Send a dbus message to all user domains.
|
|
Chris PeBenito |
9fd4b8 |
## </summary>
|
|
Chris PeBenito |
9fd4b8 |
## <param name="domain">
|
|
Chris PeBenito |
9fd4b8 |
## Domain allowed access.
|
|
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 |
')
|
|
Chris PeBenito |
9fd4b8 |
|
|
Chris PeBenito |
9fd4b8 |
########################################
|
|
Chris PeBenito |
9fd4b8 |
## <summary>
|
|
Chris PeBenito |
c98340 |
## Unconfined access to user domains.
|
|
Chris PeBenito |
c98340 |
## </summary>
|
|
Chris PeBenito |
c98340 |
## <param name="domain">
|
|
Chris PeBenito |
c98340 |
## Domain allowed access.
|
|
Chris PeBenito |
c98340 |
## </param>
|
|
Chris PeBenito |
c98340 |
#
|
|
Chris PeBenito |
c98340 |
interface(`userdom_unconfined',`
|
|
Chris PeBenito |
c98340 |
gen_require(`
|
|
Chris PeBenito |
c98340 |
type user_home_dir_t;
|
|
Chris PeBenito |
c98340 |
')
|
|
Chris PeBenito |
c98340 |
|
|
Chris PeBenito |
c98340 |
allow $1 user_home_dir_t:dir create_dir_perms;
|
|
Chris PeBenito |
c98340 |
files_create_home_dirs($1,user_home_dir_t)
|
|
Chris PeBenito |
c98340 |
')
|