Chris PeBenito 31b7c0
#DESC User - Domains for ordinary users.
Chris PeBenito 31b7c0
#
Chris PeBenito 31b7c0
#################################
Chris PeBenito 31b7c0
Chris PeBenito 31b7c0
# Booleans for user domains.
Chris PeBenito 31b7c0
Chris PeBenito 31b7c0
# Allow applications to read untrusted content
Chris PeBenito 31b7c0
# If this is disallowed, Internet content has
Chris PeBenito 31b7c0
# to be manually relabeled for read access to be granted
Chris PeBenito 31b7c0
bool read_untrusted_content false;
Chris PeBenito 31b7c0
Chris PeBenito 31b7c0
# Allow applications to write untrusted content
Chris PeBenito 31b7c0
# If this is disallowed, no Internet content
Chris PeBenito 31b7c0
# will be stored.
Chris PeBenito 31b7c0
bool write_untrusted_content false;
Chris PeBenito 31b7c0
Chris PeBenito 31b7c0
# Allow users to read system messages.
Chris PeBenito 31b7c0
bool user_dmesg false;
Chris PeBenito 31b7c0
Chris PeBenito 31b7c0
# Support NFS home directories
Chris PeBenito 31b7c0
bool use_nfs_home_dirs false;
Chris PeBenito 31b7c0
Chris PeBenito 31b7c0
# Allow making anonymous memory executable, e.g. 
Chris PeBenito 31b7c0
# for runtime-code generation or executable stack.
Chris PeBenito 31b7c0
bool allow_execmem false;
Chris PeBenito 31b7c0
Chris PeBenito 31b7c0
# Allow making the stack executable via mprotect.
Chris PeBenito 31b7c0
# Also requires allow_execmem.
Chris PeBenito 31b7c0
bool allow_execstack false;
Chris PeBenito 31b7c0
Chris PeBenito 31b7c0
# Allow making a modified private file mapping executable (text relocation).
Chris PeBenito 31b7c0
bool allow_execmod false;
Chris PeBenito 31b7c0
Chris PeBenito 31b7c0
# Support SAMBA home directories
Chris PeBenito 31b7c0
bool use_samba_home_dirs false;
Chris PeBenito 31b7c0
Chris PeBenito 31b7c0
# Allow users to run TCP servers (bind to ports and accept connection from
Chris PeBenito 31b7c0
# the same domain and outside users)  disabling this forces FTP passive mode
Chris PeBenito 31b7c0
# and may change other protocols 
Chris PeBenito 31b7c0
bool user_tcp_server false;
Chris PeBenito 31b7c0
Chris PeBenito 31b7c0
# Allow system to run with NIS
Chris PeBenito 31b7c0
bool allow_ypbind false;
Chris PeBenito 31b7c0
Chris PeBenito 31b7c0
# Allow system to run with kerberos
Chris PeBenito 31b7c0
bool allow_kerberos false;
Chris PeBenito 31b7c0
Chris PeBenito 31b7c0
# Allow users to rw usb devices
Chris PeBenito 31b7c0
bool user_rw_usb false;
Chris PeBenito 31b7c0
Chris PeBenito 31b7c0
# Allow users to control network interfaces (also needs USERCTL=true)
Chris PeBenito 31b7c0
bool user_net_control false;
Chris PeBenito 31b7c0
Chris PeBenito 31b7c0
# Allow regular users direct mouse access 
Chris PeBenito 31b7c0
bool user_direct_mouse false;
Chris PeBenito 31b7c0
Chris PeBenito 31b7c0
# Allow user to r/w noextattrfile (FAT, CDROM, FLOPPY)
Chris PeBenito 31b7c0
bool user_rw_noexattrfile false;
Chris PeBenito 31b7c0
Chris PeBenito 31b7c0
# Allow reading of default_t files.
Chris PeBenito 31b7c0
bool read_default_t false;
Chris PeBenito 31b7c0
Chris PeBenito 31b7c0
# Allow staff_r users to search the sysadm home dir and read
Chris PeBenito 31b7c0
# files (such as ~/.bashrc)
Chris PeBenito 31b7c0
bool staff_read_sysadm_file false;
Chris PeBenito 31b7c0
Chris PeBenito 31b7c0
Chris PeBenito 31b7c0
full_user_role(user)
Chris PeBenito 31b7c0
Chris PeBenito 31b7c0
ifdef(`user_canbe_sysadm', `
Chris PeBenito 31b7c0
reach_sysadm(user)
Chris PeBenito 31b7c0
role_tty_type_change(user, sysadm)
Chris PeBenito 31b7c0
')
Chris PeBenito 31b7c0
Chris PeBenito 31b7c0
#  Do not add any rules referring to user_t to this file!  That will break
Chris PeBenito 31b7c0
#  support for multiple user roles.
Chris PeBenito 31b7c0
Chris PeBenito 31b7c0
# a role for staff that allows seeing all domains and control over the user_t
Chris PeBenito 31b7c0
# domain
Chris PeBenito 31b7c0
full_user_role(staff)
Chris PeBenito 31b7c0
Chris PeBenito 31b7c0
priv_user(staff)
Chris PeBenito 31b7c0
# if adding new user roles make sure you edit the in_user_role macro in
Chris PeBenito 31b7c0
# macros/user_macros.te to match
Chris PeBenito 31b7c0
Chris PeBenito 31b7c0
# lots of user programs accidentally search /root, and also the admin often
Chris PeBenito 31b7c0
# logs in as UID=0 domain=user_t...
Chris PeBenito 31b7c0
dontaudit unpriv_userdomain { sysadm_home_dir_t staff_home_dir_t }:dir { getattr search };
Chris PeBenito 31b7c0
Chris PeBenito 31b7c0
#
Chris PeBenito 31b7c0
# Allow the user roles to transition
Chris PeBenito 31b7c0
# into each other.
Chris PeBenito 31b7c0
role_tty_type_change(sysadm, user)
Chris PeBenito 31b7c0
role_tty_type_change(staff, sysadm)
Chris PeBenito 31b7c0
role_tty_type_change(sysadm, staff)
Chris PeBenito 31b7c0
role_tty_type_change(sysadm, secadm)
Chris PeBenito 31b7c0
role_tty_type_change(staff, secadm)
Chris PeBenito 31b7c0
Chris PeBenito 31b7c0
# "ps aux" and "ls -l /dev/pts" make too much noise without this
Chris PeBenito 31b7c0
dontaudit unpriv_userdomain ptyfile:chr_file getattr;
Chris PeBenito 31b7c0
Chris PeBenito 31b7c0
# to allow w to display everyone...
Chris PeBenito 31b7c0
bool user_ttyfile_stat false;
Chris PeBenito 31b7c0
Chris PeBenito 31b7c0
if (user_ttyfile_stat) {
Chris PeBenito 31b7c0
allow userdomain ttyfile:chr_file getattr;
Chris PeBenito 31b7c0
}
Chris PeBenito 31b7c0